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.
Created attachment 187563 [details] Patch
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.
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.
Created attachment 187569 [details] Sample page
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.
(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.
Created attachment 187577 [details] Patch
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
Committed r142594: <http://trac.webkit.org/changeset/142594>