Commit 90611c0e authored by olehougaard's avatar olehougaard

Removed a few calls to Top::ReportPendingMessages() that caused the messages...

Removed a few calls to Top::ReportPendingMessages() that caused the messages to be reported prematurely and not at the C++/JS boundary.
Review URL: http://codereview.chromium.org/13287

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bbbab482
......@@ -101,7 +101,6 @@ static Handle<JSFunction> MakeFunction(bool is_global,
// Check for parse errors.
if (lit == NULL) {
ASSERT(Top::has_pending_exception());
Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
......@@ -119,7 +118,6 @@ static Handle<JSFunction> MakeFunction(bool is_global,
// Check for stack-overflow exceptions.
if (code.is_null()) {
Top::StackOverflow();
Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
......@@ -208,6 +206,8 @@ Handle<JSFunction> Compiler::Compile(Handle<String> source,
}
}
if (result.is_null()) Top::ReportPendingMessages();
return result;
}
......@@ -272,7 +272,6 @@ bool Compiler::CompileLazy(Handle<SharedFunctionInfo> shared,
// Check for parse errors.
if (lit == NULL) {
ASSERT(Top::has_pending_exception());
Top::ReportPendingMessages();
return false;
}
......@@ -290,7 +289,6 @@ bool Compiler::CompileLazy(Handle<SharedFunctionInfo> shared,
// Check for stack-overflow exception.
if (code.is_null()) {
Top::StackOverflow();
Top::ReportPendingMessages();
return false;
}
......
......@@ -1810,6 +1810,21 @@ v8::Handle<Value> JSCheck(const v8::Arguments& args) {
}
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment