Comment #5 on issue 4026 by mattginz...@gmail.com: Exception is not properly propagated if enumerate interceptor throws an exception
https://code.google.com/p/v8/issues/detail?id=4026

The scenario I have is I've written an interceptor which calls back into Javascript with Function->Call. If the callee JS code throws an exception (I'm using the interceptor for access control, and it throws exceptions to deny access), without this patch the behavior is pretty awful: if the JS worker code invoked by the interceptor does "throw new Error('test')", and then from outside the interceptor, I do "try { Object.keys(interceptor) } catch (err) { console.log(err); }", which should provoke the interceptor to take over, call the JS worker code which throws an exception, I see one of two different behaviors:

- the exception is thrown, not caught by the "catch", becomes a toplevel uncaught exception, kills the process. The call stack is correct and clearly shows that execution was inside the try/catch, but the catch never kicked in.

- the exception is thrown, the process hangs without ever getting to the catch, confirmed by additional logging at the throw and catch sites.

This patch fixes both problems.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to