Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: test/cctest/test-api.cc

Issue 43070: Fix exception propagation problem where undefined was returned instead... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/top.h ('K') | « src/top.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
===================================================================
--- test/cctest/test-api.cc (revision 1483)
+++ test/cctest/test-api.cc (working copy)
@@ -1722,7 +1722,8 @@
if (args.Length() < 1) return v8::Boolean::New(false);
v8::HandleScope scope;
v8::TryCatch try_catch;
- v8::Script::Compile(args[0]->ToString())->Run();
+ Local<Value> result = v8::Script::Compile(args[0]->ToString())->Run();
+ CHECK(!try_catch.HasCaught() || result.IsEmpty());
return v8::Boolean::New(try_catch.HasCaught());
}
@@ -1806,8 +1807,9 @@
LocalContext context(0, templ);
v8::TryCatch try_catch;
try_catch.SetVerbose(true);
- CompileRun("ThrowFromC();");
+ Local<Value> result = CompileRun("ThrowFromC();");
CHECK(try_catch.HasCaught());
+ CHECK(result.IsEmpty());
CHECK(message_received);
v8::V8::RemoveMessageListeners(check_message);
}
@@ -1853,6 +1855,7 @@
int expected = args[3]->Int32Value();
if (try_catch.HasCaught()) {
CHECK_EQ(expected, count);
+ CHECK(result.IsEmpty());
CHECK(!i::Top::has_scheduled_exception());
} else {
CHECK_NE(expected, count);
« src/top.h ('K') | « src/top.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698