Reviewers: Mads Ager,

Message:
Mads,

may you have a look?

I was considering refactoring and renaming ShouldReportException (make explicit a part which traverses the stack vs. verbosity), but decided not to do right now
(just lazy)

can_be_exteranlly_caught might be better spelled as may_be_externally_caught

Description:
Properly process try/finally blocks.

In some circumstances, try/finally block can actually catch the exception:

function f() {
  try {
    throw 42;
  } finally {
    return 0;
  }
}

Therefore when propagating exception to v8::TryCatch, we must be sure
there is no try/finally blocks as well.

When bulding the messages we should be more conservative and expect that
any v8::TryCatch with no JS try/catch in between can potentionally
be the right exception handler.

Plus various minor refactorings.

BUG=1147
TEST=cctest/test-api/TryCatchAndFinallyHidingException,
cctest/test-api/TryCatchAndFinally

Please review this at http://codereview.chromium.org/6526016/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M samples/shell.cc
  M src/d8.cc
  M src/top.h
  M src/top.cc
  M test/cctest/test-api.cc


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to