RESOLVED FIXED 136805
Web Inspector: FunctionCall timeline records omit profile data if the debugger has paused
https://bugs.webkit.org/show_bug.cgi?id=136805
Summary Web Inspector: FunctionCall timeline records omit profile data if the debugge...
Brian Burg
Reported 2014-09-13 23:00:18 PDT
Steps to reproduce: 1. Set a breakpoint in rotateActivePiece 2. Start the game and rotate a piece 3. Continue the debugger The timeline record for Key Down will not have any children, despite the onKeyDown handler having executed some code underneath. It appears that the timeline records are getting munged improperly when the debugger is running. In particular, we have the following timeline record structure, which fails to create the correct child records with profile data (in TimelineManager.eventRecorded function processRecord) > EventDispatch (data: {"type": "keydown"}) --> FunctionCall (data: {"scriptLine: 93, "scriptName": "..."}) // NOTE: normally has 'profile' property containing root nodes ----> FunctionCall [10+] (data: {"profile": ..., "scriptLine": 1, "scriptName": "InjectedScript"}) The first nested FunctionCall record contains the expected event handler in its profile. Subsequent nested FunctionCall records contain things that actually look related to InjectedScript, and these should not be displayed on the timeline.
Attachments
Proposed Fix (4.77 KB, patch)
2014-09-14 01:12 PDT, Brian Burg
no flags
Patch (12.92 KB, patch)
2014-09-25 13:48 PDT, Brian Burg
timothy: review+
Brian Burg
Comment 1 2014-09-14 01:12:13 PDT
Created attachment 238090 [details] Proposed Fix The patch fixes this bug (regression?) but I don't have time to write a test right now. Feel free to pick it up and write one, or wait a few weeks.
Radar WebKit Bug Importer
Comment 2 2014-09-14 01:12:19 PDT
Timothy Hatcher
Comment 3 2014-09-24 20:53:25 PDT
This patch looks fine to me.
Timothy Hatcher
Comment 4 2014-09-24 20:53:59 PDT
Comment on attachment 238090 [details] Proposed Fix I thought it landed, but I guess not.
Brian Burg
Comment 5 2014-09-25 13:48:38 PDT
Timothy Hatcher
Comment 6 2014-09-25 14:52:05 PDT
Comment on attachment 238670 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238670&action=review > LayoutTests/inspector/timeline/debugger-paused-while-recording.html:56 > + WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.Paused, > + function(event) { > + InspectorTest.addResult("Debugger paused; resuming..."); > + > + WebInspector.debuggerManager.resume().then(function() { > + InspectorTest.addResult("Debugger resumed; stopping timeline capture."); > + WebInspector.timelineManager.stopCapturing(); > + }) > + > + }); function(event) { feels better on the previous line, like the other examples in this file. Also extra new line.
Brian Burg
Comment 7 2014-09-25 19:29:55 PDT
Alexey Proskuryakov
Comment 8 2014-09-25 23:58:25 PDT
Brian Burg
Comment 9 2014-09-26 10:37:08 PDT
(In reply to comment #8) > inspector/timeline/debugger-paused-while-recording.html is very flaky, failing nearly every time: > > https://build.webkit.org/results/Apple%20Mavericks%20Release%20WK2%20(Tests)/r173993%20(8220)/inspector/timeline/debugger-paused-while-recording-pretty-diff.html I skipped the new inspector/timelines/ directory in <http://trac.webkit.org/changeset/173998>, it seems to suffer similar problems to the debugger and replay tests. I'll take a look at this later, since this flakiness is a big deterrent to writing any tests.
Note You need to log in before you can comment on or make changes to this bug.