RESOLVED FIXED 109427
Web Inspector: stack trace is cut at native bind if inspector is closed
https://bugs.webkit.org/show_bug.cgi?id=109427
Summary Web Inspector: stack trace is cut at native bind if inspector is closed
Yury Semikhatsky
Reported 2013-02-11 06:52:46 PST
If inspector front-end is closed when uncaught exception is thrown, stack trace will be trimmed at the top bound function. In the attached page top function will be 'b' while there should be 'baz' and 'throwUndefined' above it.
Attachments
Patch (9.91 KB, patch)
2013-02-11 06:58 PST, Yury Semikhatsky
no flags
Sample page (371 bytes, text/html)
2013-02-11 07:32 PST, Yury Semikhatsky
no flags
Patch (5.14 KB, patch)
2013-02-11 08:21 PST, Yury Semikhatsky
pfeldman: review+
buildbot: commit-queue-
Yury Semikhatsky
Comment 1 2013-02-11 06:58:13 PST
Yury Semikhatsky
Comment 2 2013-02-11 07:02:34 PST
There use to be no stack traces if inspector front-end was closed when uncaught exception was thrown. That behavior changed after refactoring of the mechanism how console collects stack traces. Uncaught exception should be rare as they are errors in the applications. I think we it would be a reasonable tradeoff to sacrifice performance for better diagnostic in those cases.
Pavel Feldman
Comment 3 2013-02-11 07:27:56 PST
Why did this work before? This will make js engine run way more code than it used to upon exceptions. It sounds like you are avoiding the problem instead of fixing the regression.
Yury Semikhatsky
Comment 4 2013-02-11 07:32:56 PST
Created attachment 187569 [details] Sample page
Pavel Feldman
Comment 5 2013-02-11 07:35:30 PST
Comment on attachment 187563 [details] Patch I am sorry, but neither from the bug thread nor from the changelog it is clear what the problem is and why this is the right solution to it.
Yury Semikhatsky
Comment 6 2013-02-11 07:37:54 PST
(In reply to comment #3) > Why did this work before? It didn't. We used to collect only top stack frame when there was no front-end. After Mike's refactorings the behavior changed and we started to collect stack trace even with closed front-end but since the place where the stack is collected moved the stack collected while front-end is closed will be trimmed in some cases like in the example with native bind. > This will make js engine run way more code than it used to upon exceptions. It sounds like you are avoiding the problem instead of fixing the regression. This is a case of uncaught exception which was thrown and not handled by any try catch or global onerror handler so I would assume it to be uncommon one.
Yury Semikhatsky
Comment 7 2013-02-11 08:21:05 PST
Build Bot
Comment 8 2013-02-11 11:33:29 PST
Comment on attachment 187577 [details] Patch Attachment 187577 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16495302 New failing tests: http/tests/inspector-enabled/console-exception-while-no-inspector.html
Yury Semikhatsky
Comment 9 2013-02-12 01:22:31 PST
Note You need to log in before you can comment on or make changes to this bug.