WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174738
Web Inspector: Refactoring: extract async stack trace logic from InspectorInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=174738
Summary
Web Inspector: Refactoring: extract async stack trace logic from InspectorIns...
Matt Baker
Reported
2017-07-21 18:24:36 PDT
Notifying the debugger agent of events in the lifecycle of an asynchronous operation should be done by the relevant agent. Currently this is the job of InspectorInstrumenation, which handles timers and rAF. When support is added for XHR.send, postMessage, addEventListener, etc, the layering violation will get worse. Move the AsynchronousCallType enum to its own file, and other code specific to async stacks to the relevant agent.
Attachments
Patch
(15.27 KB, patch)
2017-07-21 18:46 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Patch
(22.53 KB, patch)
2017-07-24 18:55 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Patch
(22.59 KB, patch)
2017-07-25 14:05 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Matt Baker
Comment 1
2017-07-21 18:46:23 PDT
Created
attachment 316157
[details]
Patch
Blaze Burg
Comment 2
2017-07-24 10:21:54 PDT
Comment on
attachment 316157
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=316157&action=review
r- unless everyone else disagrees on the enum vs int signature issue. I wasn't paying attention when this code originally landed.
> Source/WebCore/inspector/InspectorAsynchronousCallType.h:28 > +namespace WebCore {
Please, use namespace Inspector unless it's really not possible.
> Source/WebCore/inspector/InspectorAsynchronousCallType.h:31 > + AnimationFrame = 1,
Nit: RequestAnimationFrame
> Source/WebCore/inspector/InspectorAsynchronousCallType.h:32 > + Timer,
Nit: can we call this DOMTimer to be consistent with the relevant C++ class?
> Source/WebCore/inspector/InspectorInstrumentation.cpp:349 > + debuggerAgent->didCancelAsyncCall(static_cast<int>(AsynchronousCallType::Timer), timerId);
Nooo stop it :( EDIT: I see that we did this to avoid mentioning Web-specific concepts in JSC / Debugger.json. I have no such aversion. This code should be in Inspector namespace anyway. Passing around ints is worse than some optional enum values having no meaning in JavaScriptCore proper.
> Source/WebCore/inspector/PageDebuggerAgent.cpp:160 > + JSC::ExecState* scriptState = document->execState();
The dereference of document needs a null check, or passed to here by reference.
Joseph Pecoraro
Comment 3
2017-07-24 11:48:02 PDT
Comment on
attachment 316157
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=316157&action=review
> Source/WebCore/ChangeLog:3 > + Web Inspector: Refactoring: remove async stack trace logic from InspectorInstrumentation
I'd prefer "extract" over "remove".
Matt Baker
Comment 4
2017-07-24 18:55:37 PDT
Created
attachment 316338
[details]
Patch
Blaze Burg
Comment 5
2017-07-25 14:01:30 PDT
Comment on
attachment 316338
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=316338&action=review
r=me
> Source/JavaScriptCore/ChangeLog:8 > + Move AsyncCallType enum to InspectoprDebuggerAgent, which manages async
Nit: InspectorDebuggerAgent
Matt Baker
Comment 6
2017-07-25 14:05:32 PDT
Created
attachment 316389
[details]
Patch
WebKit Commit Bot
Comment 7
2017-07-25 14:46:45 PDT
Comment on
attachment 316389
[details]
Patch Clearing flags on attachment: 316389 Committed
r219889
: <
http://trac.webkit.org/changeset/219889
>
WebKit Commit Bot
Comment 8
2017-07-25 14:46:47 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug