WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178799
Web Inspector: Canvas Tab: no way to see backtrace of where a canvas context was created
https://bugs.webkit.org/show_bug.cgi?id=178799
Summary
Web Inspector: Canvas Tab: no way to see backtrace of where a canvas context ...
Blaze Burg
Reported
2017-10-25 09:50:47 PDT
Acko.net has several canvases and I have no way to tell which one was made where. There should be a way to see this, perhaps in an "Initiator" field in the details sidebar.
Attachments
Patch
(23.11 KB, patch)
2017-10-27 01:47 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Image] After Patch is applied
(108.93 KB, image/png)
2017-10-27 01:47 PDT
,
Devin Rousso
no flags
Details
Patch
(25.61 KB, patch)
2017-10-27 16:35 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-10-25 09:51:01 PDT
<
rdar://problem/35175805
>
Devin Rousso
Comment 2
2017-10-27 01:47:28 PDT
Created
attachment 325138
[details]
Patch
Devin Rousso
Comment 3
2017-10-27 01:47:42 PDT
Created
attachment 325139
[details]
[Image] After Patch is applied
Blaze Burg
Comment 4
2017-10-27 08:59:25 PDT
Comment on
attachment 325138
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325138&action=review
r=me
> Source/WebCore/inspector/InspectorCanvas.cpp:194 > +Ref<Inspector::Protocol::Canvas::Canvas> InspectorCanvas::buildObjectForCanvas(InstrumentingAgents& instrumentingAgents, bool captureBacktrace)
This sort of implicitly assumes this method is called underneath canvasAdded and equivalent JS code that creates the context. Perhaps you should write this into the description of the protocol parameter so that the semantics are more clear. For example, "Backtrace that was captured when this canvas context is created".
> Source/WebCore/inspector/InspectorCanvas.cpp:261 > + if (captureBacktrace) {
It would be cool to extract common stack walking code. It could take a lambda(ScriptCallFrame&) to perform the extraction (swizzled index or buildInspectorObject()). Please re-EWS if you do that.
> Source/WebCore/inspector/InspectorCanvasAgent.cpp:395 > + m_frontendDispatcher->canvasAdded(inspectorCanvas->buildObjectForCanvas(m_instrumentingAgents, true));
I would remove the default parameter value and add 'false' to the other call site just so it's explicit. (If we called this in dozens of places, my opinion would be different.) Can you extract 'true' or 'false' into a local variable with a better name?
Devin Rousso
Comment 5
2017-10-27 16:35:48 PDT
Created
attachment 325216
[details]
Patch
WebKit Commit Bot
Comment 6
2017-10-27 18:58:56 PDT
Comment on
attachment 325216
[details]
Patch Clearing flags on attachment: 325216 Committed
r224142
: <
https://trac.webkit.org/changeset/224142
>
WebKit Commit Bot
Comment 7
2017-10-27 18:58:57 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