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

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

Issue 11365200: Correctly handle uncaught exception objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « src/isolate.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
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 41eb68f231f24d1f5fdc9eff1211429e8efa206e..ec7379c468f7a31a01c46dfa311ad8e9779bdcb0 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2554,6 +2554,18 @@ THREADED_TEST(ScriptException) {
}
+TEST(TryCatchCustomException) {
+ v8::HandleScope scope;
+ LocalContext env;
+ v8::TryCatch try_catch;
+ CompileRun("function CustomError() { this.a = 'b'; }"
+ "(function f() { throw new CustomError(); })();");
+ CHECK(try_catch.HasCaught());
+ CHECK(try_catch.Exception()->ToObject()->
+ Get(v8_str("a"))->Equals(v8_str("b")));
+}
+
+
bool message_received;
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698