Bug 145071

Summary: Web Inspector: Uncaught exception in inspector page while handling event Console.messageAdded: TypeError: null is not an object (evaluating 'sourceCodeLocation.sourceCode')
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=144982

Description Timothy Hatcher 2015-05-15 14:08:07 PDT
Uncaught exception in inspector page while handling event Console.messageAdded:  TypeError: null is not an object (evaluating 'sourceCodeLocation.sourceCode')

CallFrameView@Views/CallFrameView.js:40:46
_appendLocationLink@Views/ConsoleMessageView.js:307:61
ConsoleMessageView@Views/ConsoleMessageView.js:85:33
appendConsoleMessage@Controllers/JavaScriptLogViewController.js:142:69
_messageAdded@Views/LogContentView.js:321:71
dispatch@Base/Object.js:124:55
dispatchEventToListeners@Base/Object.js:131:17
messageWasAdded@Controllers/LogManager.js:48:38
messageAdded@Protocol/ConsoleObserver.js:47:48
dispatchEvent@Protocol/InspectorBackend.js:353:42
_dispatchEvent@Protocol/InspectorBackend.js:233:32
dispatch@Protocol/InspectorBackend.js:88:32
dispatchNextQueuedMessageFromBackend@Protocol/MessageDispatcher.js:42:34

It also triggers:

Views/CallFrameView.js:30:23: CONSOLE ERROR
Base/Main.js:1782:19: CONSOLE ERROR
Comment 1 Radar WebKit Bug Importer 2015-05-15 14:08:29 PDT
<rdar://problem/20980732>
Comment 2 Timothy Hatcher 2015-05-15 14:08:43 PDT
I hit this opening the Inspector on cnn.com. I can't reproduce right now though.
Comment 3 Radar WebKit Bug Importer 2015-05-15 14:09:06 PDT
<rdar://problem/20980743>
Comment 4 Nikita Vasilyev 2015-05-15 16:21:08 PDT
> Console.messageAdded:  TypeError: null is not an object (evaluating 'sourceCodeLocation.sourceCode')

I've seen this a couple of times, but the exact steps to reproduce the problem are still unclear to me. 

However, it should fixed with https://bugs.webkit.org/show_bug.cgi?id=144982 as I added  "if (sourceCodeLocation)" in WebInspector.CallFrameView.
Comment 5 Nikita Vasilyev 2015-05-21 19:49:28 PDT
Fixed with https://bugs.webkit.org/show_bug.cgi?id=144982.