| 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;
|
|
|
|
|
|
|