Author: olehougaard
Date: Tue Dec 9 05:18:33 2008
New Revision: 954
Modified:
branches/bleeding_edge/src/compiler.cc
branches/bleeding_edge/test/cctest/test-api.cc
Log:
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
Modified: branches/bleeding_edge/src/compiler.cc
==============================================================================
--- branches/bleeding_edge/src/compiler.cc (original)
+++ branches/bleeding_edge/src/compiler.cc Tue Dec 9 05:18:33 2008
@@ -101,7 +101,6 @@
// Check for parse errors.
if (lit == NULL) {
ASSERT(Top::has_pending_exception());
- Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
@@ -119,7 +118,6 @@
// Check for stack-overflow exceptions.
if (code.is_null()) {
Top::StackOverflow();
- Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
@@ -208,6 +206,8 @@
}
}
+ if (result.is_null()) Top::ReportPendingMessages();
+
return result;
}
@@ -272,7 +272,6 @@
// Check for parse errors.
if (lit == NULL) {
ASSERT(Top::has_pending_exception());
- Top::ReportPendingMessages();
return false;
}
@@ -290,7 +289,6 @@
// Check for stack-overflow exception.
if (code.is_null()) {
Top::StackOverflow();
- Top::ReportPendingMessages();
return false;
}
Modified: branches/bleeding_edge/test/cctest/test-api.cc
==============================================================================
--- branches/bleeding_edge/test/cctest/test-api.cc (original)
+++ branches/bleeding_edge/test/cctest/test-api.cc Tue Dec 9 05:18:33 2008
@@ -1810,6 +1810,21 @@
}
+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
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---