WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144309
Web Inspector: Exception under ObjectTreeView.js on specific code.tutsplus.com page
https://bugs.webkit.org/show_bug.cgi?id=144309
Summary
Web Inspector: Exception under ObjectTreeView.js on specific code.tutsplus.co...
Timothy Hatcher
Reported
2015-04-27 19:51:03 PDT
Load
http://code.tutsplus.com/tutorials/say-hello-to-webkit-filters--net-23318
with the Inspector open. Didn't do anything special. TypeError: null is not an object (evaluating 'a.match(chunk)') comparePropertyDescriptors@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ObjectTreeView.js:134:29 sort@[native code] _updateProperties@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ObjectTreeView.js:287:24 _updateChildren@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ObjectTreeView.js:257:21 _updateChildren@[native code] _getPropertyDescriptorsResolver@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/RemoteObject.js:510:17 _getPropertyDescriptorsResolver@[native code] _dispatchCallback@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:181:31 dispatch@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:86:35 dispatchNextQueuedMessageFromBackend@file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/MessageDispatcher.js:42:34 file:///Users/Timothy/Work/Safari-TOT.git/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Controllers/FormatterContentBuilder.js:156:23: CONSOLE ERROR
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-04-27 19:51:37 PDT
<
rdar://problem/20721693
>
Joseph Pecoraro
Comment 2
2015-04-27 20:34:54 PDT
I don't understand how this is possible. Here is the code, annotated with some comments. ... // By this point, a and b should be strings. If they aren't something else went wrong in surrounding code. // 1. Rule out equivalent names. if (a === b) return 0; while (diff === 0) { // 2. Rule out one being shorter then the other. if (!a && b) return -1; if (!b && a) return 1; chunka = a.match(chunk)[0]; chunkb = b.match(chunk)[0]; anum = !isNaN(chunka); bnum = !isNaN(chunkb); // 3. Number versus non number cases. if (anum && !bnum) return -1; if (bnum && !anum) return 1; // 4. Number differences, if the same we continue. if (anum && bnum) { diff = chunka - chunkb; if (diff === 0 && chunka.length !== chunkb.length) { if (!+chunka && !+chunkb) // chunks are strings of all 0s (special case) return chunka.length - chunkb.length; else return chunkb.length - chunka.length; } } // 5. Different strings else if (chunka !== chunkb) return (chunka < chunkb) ? -1 : 1; // 6. Proceed to the next part of the string. a = a.substring(chunka.length); b = b.substring(chunkb.length); } ... For us to have encountered a.match(chunk) and have "a" be null then, I think something must have gone wrong. I believe Geoff just re-wrote Array.prototype.sort, so maybe that is related?
Joseph Pecoraro
Comment 3
2015-04-27 20:37:48 PDT
Tim, it looks like Geoff's sort changes (
r183288
) got rolled out a bit later (
r183308
). My ToT (
r183442
) was not encountering the issue. Do you know what r### your JavaScriptCore was?
Timothy Hatcher
Comment 4
2015-04-28 09:50:10 PDT
I had Geoff's change at the time. Rebuilding to see if it is better.
Timothy Hatcher
Comment 5
2015-04-28 12:15:01 PDT
Looks fine now.
Geoffrey Garen
Comment 6
2015-04-29 16:55:26 PDT
I see this in TOT, and in 183568, just before the Array.prototype.sort patch re-landed: Uncaught exception in inspector page while handling event Network.responseReceived: (2) TypeError: undefined is not an object (evaluating 'b.resource.type') "
compareResourceTreeElements@Main.js
:6957:63
compareFolderAndResourceTreeElements@Main.js
:6968:114
value@Main.js
:516:107
insertionIndexForObjectInListSortedByFunction@Main.js
:535:96
descendantResourceTreeElementTypeDidChange@Main.js
:6825:240
callFirstAncestorFunction@Main.js
:6238:130
_typeDidChange@Main.js
:6992:112
dispatch@Main.js
:100:158
dispatchEventToListeners@Main.js
:102:9
updateForResponse@Main.js
:3576:30
resourceRequestDidReceiveResponse@Main.js
:14444:51
responseReceived@Main.js
:797:69
dispatchEvent@Main.js
:723:34
_dispatchEvent@Main.js
:687:55
dispatch@Main.js
:651:20
dispatchNextQueuedMessageFromBackend@Main.js
:786:32" _dispatchEventMain.js:687:105 dispatchMain.js:651 dispatchNextQueuedMessageFromBackend
Timothy Hatcher
Comment 7
2015-05-01 07:49:54 PDT
Geoff, was that loading the same page linked above?
Geoffrey Garen
Comment 8
2015-05-01 11:41:51 PDT
(In reply to
comment #7
)
> Geoff, was that loading the same page linked above?
Yeah, same page.
Timothy Hatcher
Comment 9
2015-07-30 11:44:52 PDT
Seems to be fine.(In reply to
comment #8
)
> (In reply to
comment #7
) > > Geoff, was that loading the same page linked above? > > Yeah, same page.
Filed new bug about that.
Bug 147451
.
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