[Webkit-unassigned] [Bug 167934] Rethrowing error resets stack trace making debugging hard

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 10 19:39:09 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=167934

Caitlin Potter (:caitp) <caitp at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caitp at igalia.com

--- Comment #8 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
Quick design for a fix:

1. In `JSC::Exception::create(VM&, JSValue);`:
If thrownValue inherits ErrorInstance, and does not have a captured stacktrace already, store the captured stacktrace on it (private symbol, or member of ErrorInstance).

2. In createScriptCallStackFromException() (ScriptCallStackFactory.cpp):
If exception->value() is an instance of ErrorInstance, load the stacktrace symbol,
and use it to assemble the ScriptCallStack

Console API adds the message like usual, and it should include the originally thrown stacktrace (provided the thrown object inherits(ErrorInstance::class())).

---

This seems to more or less match the behaviour of Chromium, so although there are caveats, I don't know that anyone has found that behaviour problematic in Chromium yet.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170711/02a4f3b1/attachment-0001.html>


More information about the webkit-unassigned mailing list