// Check for parse errors.
if (lit == NULL) {
ASSERT(Top::has_pending_exception());
- Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
// Check for stack-overflow exceptions.
if (code.is_null()) {
Top::StackOverflow();
- Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
}
}
+ if (result.is_null()) Top::ReportPendingMessages();
+
return result;
}
// Check for parse errors.
if (lit == NULL) {
ASSERT(Top::has_pending_exception());
- Top::ReportPendingMessages();
return false;
}
// Check for stack-overflow exception.
if (code.is_null()) {
Top::StackOverflow();
- Top::ReportPendingMessages();
return false;
}
}
+THREADED_TEST(EvalInTryFinally) {
+ v8::HandleScope scope;
+ LocalContext context;
+ v8::TryCatch try_catch;
+ CompileRun("(function() {"
+ " try {"
+ " eval('asldkf (*&^&*^');"
+ " } finally {"
+ " return;"
+ " }"
+ "})()");
+ CHECK(!try_catch.HasCaught());
+}
+
+
// This test works by making a stack of alternating JavaScript and C
// activations. These activations set up exception handlers with regular
// intervals, one interval for C activations and another for JavaScript