Summary: | Web Inspector: Timeline Events are not propagated to frontend. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ilya Tikhonovsky <loislo> | ||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, pfeldman, timothy, yurys | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Ilya Tikhonovsky
2010-03-31 10:17:13 PDT
Created attachment 52183 [details]
[patch] Initial version.
Created attachment 52291 [details]
[patch] Second iteration.
Pointer to page will be used for obtaining pointer to inspector.
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? 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. Created attachment 52307 [details]
[patch] Third iteration.
Just fixed style problems identified by Timothy.
Comment on attachment 52307 [details] [patch] Third iteration. Clearing flags on attachment: 52307 Committed r56931: <http://trac.webkit.org/changeset/56931> All reviewed patches have been landed. Closing bug. |