Status: Assigned
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium
New issue 2166 by [email protected]: Nested v8::TryCatch blocks
don't rethrow properly
http://code.google.com/p/v8/issues/detail?id=2166
The following unit test repros the issue:
static void NestedTryCatchBlocksHelper(int depth) {
if (depth > 0) {
v8::TryCatch try_catch;
NestedTryCatchBlocksHelper(depth - 1);
CHECK(try_catch.HasCaught());
try_catch.ReThrow();
} else {
v8::ThrowException(v8_str("back"));
}
}
TEST(NestedTryCatchBlocks) {
v8::V8::Initialize();
v8::HandleScope scope;
LocalContext context;
v8::TryCatch try_catch;
NestedTryCatchBlocksHelper(5);
CHECK(try_catch.HasCaught());
CHECK_EQ(0,
strcmp(*v8::String::Utf8Value(try_catch.Exception()), "back"));
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev