RESOLVED FIXED 36890
Web Inspector: Timeline Events are not propagated to frontend.
https://bugs.webkit.org/show_bug.cgi?id=36890
Summary Web Inspector: Timeline Events are not propagated to frontend.
Ilya Tikhonovsky
Reported 2010-03-31 10:17:13 PDT
Sometimes js code can detach page from it's frame and in that case Events will stay in the TimelineAgent's events stack. Only immediate events will appear at frontend like Send Request
Attachments
[patch] Initial version. (2.33 KB, patch)
2010-03-31 10:19 PDT, Ilya Tikhonovsky
no flags
[patch] Second iteration. (5.56 KB, patch)
2010-04-01 06:47 PDT, Ilya Tikhonovsky
yurys: review+
[patch] Third iteration. (5.69 KB, patch)
2010-04-01 10:16 PDT, Ilya Tikhonovsky
no flags
Ilya Tikhonovsky
Comment 1 2010-03-31 10:19:46 PDT
Created attachment 52183 [details] [patch] Initial version.
Ilya Tikhonovsky
Comment 2 2010-04-01 06:47:26 PDT
Created attachment 52291 [details] [patch] Second iteration. Pointer to page will be used for obtaining pointer to inspector.
Yury Semikhatsky
Comment 3 2010-04-01 07:21:40 PDT
Comment on attachment 52291 [details] [patch] Second iteration. > if (timelineAgent) { > v8::ScriptOrigin origin = function->GetScriptOrigin(); > if (!origin.ResourceName().IsEmpty()) > - timelineAgent->willCallFunction(v8ValueToWebCoreString(origin.ResourceName()), function->GetScriptLineNumber() + 1); > + timelineAgent->willCallFunction(toWebCoreString(origin.ResourceName()), function->GetScriptLineNumber() + 1); It may be useful to see function calls even if resource name is empty. > + if (inspectedPage) { > + InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent(); > + if (timelineAgent) > + timelineAgent->didCallFunction(); > + } If you move timelineAgent declaration out of the if before the function call above if (inspectedPage) can be removed. > + if (inspectedPage) { > + InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent(); > + if (timelineAgent) > + timelineAgent->didDispatchEvent(); > + } Ditto. > + if (inspectedPage) { > + InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent(); > + if (timelineAgent) > timelineAgent->didDispatchEvent(); > } Just checking if (timelineAgentIsActive) here would make the code more clear. Could we have a test for the case when frame is detached?
Timothy Hatcher
Comment 4 2010-04-01 08:50:50 PDT
Comment on attachment 52291 [details] [patch] Second iteration. > + InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent(); > if (timelineAgent) { You should combine these two lines. > + InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent(); > + if (timelineAgent) Ditto. > + InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent(); > + if (timelineAgent) Ditto.
Ilya Tikhonovsky
Comment 5 2010-04-01 10:16:28 PDT
Created attachment 52307 [details] [patch] Third iteration. Just fixed style problems identified by Timothy.
WebKit Commit Bot
Comment 6 2010-04-01 12:58:41 PDT
Comment on attachment 52307 [details] [patch] Third iteration. Clearing flags on attachment: 52307 Committed r56931: <http://trac.webkit.org/changeset/56931>
WebKit Commit Bot
Comment 7 2010-04-01 12:58:46 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.