Reviewers: Christian Plesner Hansen,
Message:
Both mozilla and escft tests run.
There is one thing I don't like, and that is the line
thread_local_.external_caught_exception_ = false;
in Top::DoThrow.
The reason for it being there is that
try { } catch { } finally { }
is rewritten in the AST as
try { try { } catch { } } finally { }
When there is a throw both in the catch and in the finally and a C++
TryCatch outside then the exception from the catch will be registered
with the C++ TryCatch, but will have to be overwritten by the exception
form the finally.
Thinking of that it probably will be an issue with the MessageHandler if
there is no C++ TryCatch as it will be called with both the throw in the
catch and the throw in the finally. There is no message test using the
MessageHandler.
Description:
Changed the message reporting for try { ... } finally { ... } statements
to
report the exception when they happen in the try block and not as
previously
when re-thrown after execution of the finally block. There is no longer
any
message generated by re-throw.
Added test cases for various combinations of try/catch/finally with
throw in
different places.
Added a regression directory to the messages tests which is processed by
the
test runner.
BUG=75
Please review this at http://codereview.chromium.org/8050
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/top.cc
D test/message/bugs/try-finally-linenum.js
D test/message/bugs/try-finally-linenum.out
A + test/message/regress/regress-75.js
A + test/message/regress/regress-75.out
M test/message/testcfg.py
A test/message/try-catch-finally-throw-in-catch-and-finally.js
A test/message/try-catch-finally-throw-in-catch-and-finally.out
A test/message/try-catch-finally-throw-in-catch.js
A test/message/try-catch-finally-throw-in-catch.out
A test/message/try-catch-finally-throw-in-finally.js
A test/message/try-catch-finally-throw-in-finally.out
A test/message/try-finally-throw-in-finally.js
A test/message/try-finally-throw-in-finally.out
A test/message/try-finally-throw-in-try-and-finally.js
A test/message/try-finally-throw-in-try-and-finally.out
A test/message/try-finally-throw-in-try.js
A test/message/try-finally-throw-in-try.out
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---