Commit 7c7d192a authored by caitpotter88's avatar caitpotter88 Committed by Commit bot

[test] re-add test for SetAbortOnUncaughtExceptionCallback() API

BUG=
R=
LOG=N

Review URL: https://codereview.chromium.org/1392763003

Cr-Commit-Position: refs/heads/master@{#31158}
parent 83a3fc7e
......@@ -21865,6 +21865,37 @@ TEST(EstimatedContextSize) {
}
static int nb_uncaught_exception_callback_calls = 0;
bool NoAbortOnUncaughtException(v8::Isolate* isolate) {
++nb_uncaught_exception_callback_calls;
return false;
}
TEST(AbortOnUncaughtExceptionNoAbort) {
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> global_template =
v8::ObjectTemplate::New(isolate);
LocalContext env(NULL, global_template);
i::FLAG_abort_on_uncaught_exception = true;
isolate->SetAbortOnUncaughtExceptionCallback(NoAbortOnUncaughtException);
CompileRun("function boom() { throw new Error(\"boom\") }");
v8::Local<v8::Object> global_object = env->Global();
v8::Local<v8::Function> foo =
v8::Local<v8::Function>::Cast(global_object->Get(v8_str("boom")));
foo->Call(global_object, 0, NULL);
CHECK_EQ(1, nb_uncaught_exception_callback_calls);
}
TEST(AccessCheckedIsConcatSpreadable) {
i::FLAG_harmony_concat_spreadable = true;
v8::Isolate* isolate = CcTest::isolate();
......
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