Test case: <!DOCTYPE html> <html> <body> <script> function test() { setTimeout(function() {}, 100); } eval(test.toString() + "\n//@ sourceURL= foo.js"); test(); </script> </body> </html> 1. Open the inspector 2. Resources 3. See test.html in the content view (Source Code or DOM) 4. Click "test.html" in the navigation area, and select "Extra Scripts" file:///Users/burg/repos/webkit/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentView.js:130:38: CONSOLE ERROR TypeError: undefined is not a valid argument for 'instanceof' (evaluating 'representedObject instanceof WebInspector.LegacyJavaScriptProfileObject')
<rdar://problem/19150581>
That doesn't sound like an assertion, that sounds like an uncaught exception! WebInspector.LegacyJavaScriptProfileObject doesn't exist. This is blocking creating content views for anything later on (like ContentFlow). Should be easy to fix.
Hmm, I don't know how you hit the exception with those steps to reproduce, but this patch should fix the issue.
Created attachment 242602 [details] [PATCH] Proposed Fix
* STEPS TO REPRODUCE 1. Inspect <http://umaar.github.io/css-region-demo/> 2. Select the "example-1" Content Flow in the sidebar => nothing happens, uncaught exception
Comment on attachment 242602 [details] [PATCH] Proposed Fix Better fix coming that will actually allow us to show content flows.
Created attachment 242603 [details] [PATCH] Proposed Fix Fixes all the uncaught exceptions. Unfortunately there are issues showing the DOM Tree of some of these Content Flows, so more bugs are in order.
Created attachment 242604 [details] [PATCH] Proposed Fix - Better ChangeLog
Comment on attachment 242604 [details] [PATCH] Proposed Fix - Better ChangeLog View in context: https://bugs.webkit.org/attachment.cgi?id=242604&action=review > Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js:240 > + parentTreeElement.insertChild(childTreeElement, insertionIndexForObjectInListSortedByFunction(childTreeElement, parentTreeElement.children, this.compareChildTreeElements.bind(this))); Is there an eslint rule that can figure out this was missing, if the callback is not defined inline? (In this case it seems like it might be harder, and certainly not possible for arbitrary property bindings. But we don't do too much in the way of dynamically binding functions to properties)
Comment on attachment 242604 [details] [PATCH] Proposed Fix - Better ChangeLog Clearing flags on attachment: 242604 Committed r176853: <http://trac.webkit.org/changeset/176853>
All reviewed patches have been landed. Closing bug.
(In reply to comment #9) > Comment on attachment 242604 [details] > [PATCH] Proposed Fix - Better ChangeLog > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242604&action=review > > > Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js:240 > > + parentTreeElement.insertChild(childTreeElement, insertionIndexForObjectInListSortedByFunction(childTreeElement, parentTreeElement.children, this.compareChildTreeElements.bind(this))); > > Is there an eslint rule that can figure out this was missing, if the > callback is not defined inline? (In this case it seems like it might be > harder, and certainly not possible for arbitrary property bindings. But we > don't do too much in the way of dynamically binding functions to properties) Hmm, I'm not sure. If ESLint can jump from the token "compareChildTreeElements" to the definition of it then yes it could. But I don't think ESLint can do that right now. The rules I see it having "no-extra-bind" work on FunctionExpressions, it doesn't check for Properties and jump to analyzing the AST where that property was assigned / declared.