WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
147438
Web Inspector: hard to find callers that cause ES6 TypeErrors thrown during inspector initialization
https://bugs.webkit.org/show_bug.cgi?id=147438
Summary
Web Inspector: hard to find callers that cause ES6 TypeErrors thrown during i...
Brian Burg
Reported
2015-07-29 22:18:18 PDT
I have run into the following situation: a code refactoring I made introduced a TypeError, thrown by a caller that erroneously invokes an ES6 class constructor during inspector initialization. Unfortunately, the only error shown (with logging to console by stderr) is: file:///Users/burg/repos/webkit-dev/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DataGrid.js:28:16: CONSOLE ERROR TypeError: Cannot call a class constructor Currently, ConsoleClient only captures a call stack for console messages with the "trace" type. So, the console only displays the first frame from the uncaught exception. The check that throws a TypeError is directly emitted into the constructor bytecode stream, which is what's seen here. But it's really the caller (next call frame) that we care about. So this seems to mostly be a problem associated with new ES6 errors with mysterious source locations. I propose two possible fixes, which are not mutually exclusive: * omit the call frame that's currently reported, since it is misleading to a user who is trying to debug the invalid call. * always capture/log multiple stack frames for uncaught exceptions, just like ConsoleClient does for "trace" messages. I welcome your thoughts on this issue prior to writing code.
Attachments
reduced test case
(516 bytes, text/html)
2015-09-08 09:41 PDT
,
Blaze Burg
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-07-29 22:18:33 PDT
<
rdar://problem/22066390
>
Joseph Pecoraro
Comment 2
2015-07-30 11:22:34 PDT
What I would probably do is remote debug the failed inspector with a known good inspector and then reload the failed inspector page.
Blaze Burg
Comment 3
2015-09-08 09:41:09 PDT
Created
attachment 260764
[details]
reduced test case
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