Deferring the reporting is probably the only way to avoid reporting uncaught exceptions which are actually canceled by return from within finally. The complexity of the exception handling makes it difficult to reason about changes so I guess we will have to rely on our tests.
http://codereview.chromium.org/12901/diff/1/6 File src/execution.cc (right): http://codereview.chromium.org/12901/diff/1/6#newcode101 Line 101: Top::clear_pending_message(); If there is no pending exception clearing it should not be needed. http://codereview.chromium.org/12901/diff/1/3 File src/top.cc (right): http://codereview.chromium.org/12901/diff/1/3#newcode742 Line 742: bool Top::IsUncaughtException(bool* is_caught_externally) { This function does not only check whether the exception is uncaught as if it is caught by a C++ TryCatch it also checks whether that handler is verbose. This should be taken into account with the name change (perhaps adding another reference parameter) and the comments should also be changed as they still mention reporting the exception. http://codereview.chromium.org/12901/diff/1/3#newcode838 Line 838: // NOTE: Notifying the debugger may have caused new exceptions. Generating the message without reporting it can also cause a new exception. http://codereview.chromium.org/12901/diff/1/2 File test/cctest/test-api.cc (right): http://codereview.chromium.org/12901/diff/1/2#newcode2991 Line 2991: TEST(TryCatchFinallyUsingMessaging) { I suggest to change this test into one or more message test written in JavaScript. We already have most of the try-catch-finally covered by a set of message tests, with exception cancellation by returning from finally missing. http://codereview.chromium.org/12901 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
