RESOLVED FIXED 117755
Web Inspector: Infrequent uncaught exception with debugger popovers breaks inspector
https://bugs.webkit.org/show_bug.cgi?id=117755
Summary Web Inspector: Infrequent uncaught exception with debugger popovers breaks in...
Joseph Pecoraro
Reported 2013-06-18 14:23:43 PDT
I've been able to somewhat reliably reproduce an uncaught exception with debugger popovers: [Error] TypeError: 'undefined' is not a function (evaluating 'bestFrame.minX()') _update (Popover.js, line 228) present (Popover.js, line 117) _showPopover (SourceCodeTextEditor.js, line 982) _showPopoverForUndefined (SourceCodeTextEditor.js, line 1089) populate (SourceCodeTextEditor.js, line 952) populate dispatch (InspectorBackend.js, line 209) dispatchNextQueuedMessageFromBackend (Main.js, line 290) (anonymous function) I threw in some logging and caught what was happening: // Logging: console.log("FRAME", JSON.stringify(bestFrame), typeof bestFrame.minX); [Log] FRAME {"origin":{"x":427,"y":235},"size":{"width":83,"height":51}} function (Popover.js, line 229, x3) [Log] FRAME {"origin":{"x":427,"y":67},"size":{"width":83,"height":51}} function (Popover.js, line 229, x10) [Log] FRAME {"origin":{"x":0,"y":0},"size":{"width":0,"height":0}} undefined (Popover.js, line 229) // ERROR Because WebInspector.Rect.ZERO_RECT was constructed before we replace the WebInspector.Rect.prototype it didn't get the methods we expected it to have! js> WebInspector.Rect.ZERO_RECT instanceof WebInspector.Rect false
Attachments
[PATCH] Proposed Fix (6.38 KB, patch)
2013-06-18 15:23 PDT, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2013-06-18 14:24:24 PDT
Joseph Pecoraro
Comment 2 2013-06-18 14:26:52 PDT
Doing a quick search through the code base, ZERO_SIZE and ZERO_RECT were the only 2 objects being initialized before we reassigned the prototype. There were only a few other objects, all safe. shell> ack '^WebInsp.*?= new' Geometry.js 87:WebInspector.Size.ZERO_SIZE = new WebInspector.Size(0, 0); 178:WebInspector.Rect.ZERO_RECT = new WebInspector.Rect(0, 0, 0, 0); Object.js 235:WebInspector.notifications = new WebInspector.Object; Popover.js 56:WebInspector.Popover.AnchorSize = new WebInspector.Size(22, 11); 57:WebInspector.Popover.ShadowEdgeInsets = new WebInspector.EdgeInsets(WebInspector.Popover.ShadowPadding);
Radar WebKit Bug Importer
Comment 3 2013-06-18 14:27:16 PDT
Joseph Pecoraro
Comment 4 2013-06-18 14:28:10 PDT
Also the only non-WebInspector namespaced object (InspectorBackend) was correct.
Joseph Pecoraro
Comment 5 2013-06-18 15:23:53 PDT
Created attachment 204948 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 6 2013-06-18 15:44:46 PDT
Comment on attachment 204948 [details] [PATCH] Proposed Fix Clearing flags on attachment: 204948 Committed r151704: <http://trac.webkit.org/changeset/151704>
WebKit Commit Bot
Comment 7 2013-06-18 15:44:48 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.