[Webkit-unassigned] [Bug 121382] New: Web Inspector: TypeError when updating ResourceTreeElement created in strange order
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Sep 15 03:18:19 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=121382
Summary: Web Inspector: TypeError when updating
ResourceTreeElement created in strange order
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
URL: http://www.pixastic.com/labs/digg_attack/
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Inspector
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: burg at cs.washington.edu
CC: timothy at apple.com, joepeck at webkit.org,
webkit-bug-importer at group.apple.com, graouts at apple.com
Created an attachment (id=211698)
--> (https://bugs.webkit.org/attachment.cgi?id=211698&action=review)
trivial fix for missing instanceof check
Repro:
Go to any web page with the inspector open. Then, navigate to http://www.pixastic.com/labs/digg_attack/. The inspector will encounter a TypeError.
[Error] TypeError: undefined is not a function (evaluating 'this.updateStatusForMainFrame()')
_updateStatus (ResourceTreeElement.js, line 188)
dispatch (Object.js, line 180)
dispatchEventToListeners (Object.js, line 187)
markAsFinished (Resource.js, line 593)
resourceRequestDidFinishLoading (FrameResourceManager.js, line 320)
loadingFinished (NetworkObserver.js, line 58)
dispatch (InspectorBackend.js, line 262)
dispatchNextQueuedMessageFromBackend (Main.js, line 298)
(anonymous function)
Analysis:
It appears this happens only on navigating to this page, not on reloading it. When reloaded, a ResourceTreeElement for the main frame resource is created (triggered by adding breakpoints, IIRC), then a FrameTreeElement for the main frame resource is created later. In the navigation case, the instantiation order is reversed for some reason; since the main frame is already established by this later time, the guard inside ResourceTreeElement._updateStatus succeeds despite the constructor being incorrect.
Fix:
I was able to avoid this error by adding an instanceof check to the guard. A trivial patch (with some previously missed code cleanup) is attached; I'm busy this weekend and won't have time to update my integration checkout, rebase, make changelog, etc until later this week. Feel free to commit it, or not.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list