Web Inspector: FunctionCall timeline records omit profile data if the debugger has paused
https://bugs.webkit.org/show_bug.cgi?id=136805
Reviewed by Timothy Hatcher.
Source/WebCore:
TimelineAgent was mismanaging its call stack depth counter, which caused nested FunctionCall
records to steal the parent FunctionCall's captured profile in the child's didCallFunction().
Thus, the top FunctionCall node had no profile data and nested FunctionCall nodes each had
their own profiles. The frontend expected just one profile, so it didn't show anything when
it couldn't be found.
Test: inspector/timeline/debugger-paused-while-recording.html
* inspector/InspectorTimelineAgent.cpp: Rename m_recordingProfileDepth to m_callStackDepth.
(WebCore::InspectorTimelineAgent::willCallFunction): Fix the call stack depth management.
(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
Source/WebInspectorUI:
* UserInterface/Test.html: Add missing include for ScopeChainNode.js.
LayoutTests:
Add a test to see that script timeline records contain profiles even when
the debugger pauses during timeline capturing.
* inspector/timeline/debugger-paused-while-recording-expected.txt: Added.
* inspector/timeline/debugger-paused-while-recording.html: Added.
* inspector/timeline/resources/timeline-helper.js: Added.
(callFunction):
(hook):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed