WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
128433
REGRESSION: Web Inspector: restoring a breakpoint tree element on re-open can throw an exception
https://bugs.webkit.org/show_bug.cgi?id=128433
Summary
REGRESSION: Web Inspector: restoring a breakpoint tree element on re-open can...
Blaze Burg
Reported
2014-02-07 18:34:12 PST
If the inspector tries to restore a selected breakpoint tree element on re-open, sometimes it will fail hit an assertion in ResourceSidebarPanel. After some diagnosis, JoePeck and I think that the following sequence of events leads to this: 0. inspector receives the frame resource tree 1. debugger manager gets ResourceAdded event 2. debugger manager adds breakpoints for the resource 3. breakpoint tree element gets added 4. tree element matches pending view state cookie, so we try to select the breakpoint 5. selecting the breakpoint calls showSourceCodeLocation, which shows the source code, adds a new back/forward entry, and selects the represented object in the sidebar 6. the resource does not yet have a sidebar tree element, so we hit an assertion. So, we think this happens because the tree element has not yet been created by Frame's event listener for ResourceAdded, or it is in the frame tree element's update queue and hasn't been added to the tree yet. Possible fix: a) To fix the dependency on ResourceAdded event listener order, defer and coalesce NavigationSidebarPanel's call to this._checkElementsForPendingViewStateCookie(treeElement); to the next run loop. b) To ensure that the work queue is empty, flush pending content tree outline updates when resourcesContentTreeOutline.findTreeElement() is called.
Attachments
Add attachment
proposed patch, testcase, etc.
Blaze Burg
Comment 1
2014-02-07 18:34:33 PST
Backtrace: file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ResourceSidebarPanel.js:261: CONSOLE ERROR: Didn't find a TreeElement for a representedObject associated with the ResourceSidebarPanel. [object Object] file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ResourceSidebarPanel.js:262: CONSOLE TRACE: 0: treeElementForRepresentedObject (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ResourceSidebarPanel.js:262) 1: _revealAndSelectRepresentedObjectInNavigationSidebar (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Main.js:887) 2: _contentBrowserCurrentContentViewDidChange (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Main.js:1061) 3: dispatch (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Object.js:180) 4: dispatchEventToListeners (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Object.js:187) 5: _currentContentViewDidChange (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ContentBrowser.js:500) 6: dispatch (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Object.js:180) 7: dispatchEventToListeners (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Object.js:187) 8: showBackForwardEntryForIndex (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ContentViewContainer.js:204) 9: showContentView (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ContentViewContainer.js:179) 10: showContentViewForRepresentedObject (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ContentBrowser.js:158) 11: showSourceCode (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ResourceSidebarPanel.js:165) 12: showSourceCodeLocation (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/ResourceSidebarPanel.js:170) 13: _treeElementSelected (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/DebuggerSidebarPanel.js:527) 14: (unknown) ([native code]) 15: select (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/TreeOutline.js:976) 16: revealAndSelect (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/TreeOutline.js:987) 17: _checkElementsForPendingViewStateCookie (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/NavigationSidebarPanel.js:683) 18: _treeElementAddedOrChanged (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/NavigationSidebarPanel.js:519) 19: (unknown) ([native code]) 20: insertChild (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/TreeOutline.js:147) 21: _addBreakpoint (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/DebuggerSidebarPanel.js:259) 22: _addBreakpointsForSourceCode (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/DebuggerSidebarPanel.js:267) 23: _resourceAdded (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/DebuggerSidebarPanel.js:273) 24: dispatch (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Object.js:180) 25: dispatchEventToListeners (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Object.js:195) 26: addResource (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Frame.js:432) 27: _addFrameTreeFromFrameResourceTreePayload (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/FrameResourceManager.js:558) 28: _processMainFrameResourceTreePayload (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/FrameResourceManager.js:509) 29: (unknown) ([native code]) 30: dispatch (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/InspectorBackend.js:220) 31: dispatchNextQueuedMessageFromBackend (file:///Users/bburg/repos/webkit/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/MessageDispatcher.js:31) 32: (unknown) ([native code])
Radar WebKit Bug Importer
Comment 2
2014-02-07 18:34:56 PST
<
rdar://problem/16018395
>
Radar WebKit Bug Importer
Comment 3
2014-02-07 18:35:12 PST
<
rdar://problem/16018397
>
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