Index: test/cctest/test-api-interceptors.cc |
diff --git a/test/cctest/test-api-interceptors.cc b/test/cctest/test-api-interceptors.cc |
index 982a4fe6f96b5cfb918731b3e582b90444ecf89d..f0f817ffc151893c0c5b31d4d0bfbcfd73a5a548 100644 |
--- a/test/cctest/test-api-interceptors.cc |
+++ b/test/cctest/test-api-interceptors.cc |
@@ -3103,21 +3103,25 @@ THREADED_TEST(IndexedAllCanReadInterceptor) { |
ExpectInt32("checked[15]", 17); |
CHECK(!CompileRun("Object.getOwnPropertyDescriptor(checked, '15')") |
->IsUndefined()); |
- CHECK_EQ(3, access_check_data.count); |
+ CHECK_EQ(2, access_check_data.count); |
access_check_data.result = false; |
ExpectInt32("checked[15]", intercept_data_0.value); |
- // Note: this should throw but without a LookupIterator it's complicated. |
- CHECK(!CompileRun("Object.getOwnPropertyDescriptor(checked, '15')") |
- ->IsUndefined()); |
- CHECK_EQ(6, access_check_data.count); |
+ { |
+ v8::TryCatch try_catch(isolate); |
+ CompileRun("Object.getOwnPropertyDescriptor(checked, '15')"); |
+ CHECK(try_catch.HasCaught()); |
+ } |
+ CHECK_EQ(4, access_check_data.count); |
intercept_data_1.should_intercept = true; |
ExpectInt32("checked[15]", intercept_data_1.value); |
- // Note: this should throw but without a LookupIterator it's complicated. |
- CHECK(!CompileRun("Object.getOwnPropertyDescriptor(checked, '15')") |
- ->IsUndefined()); |
- CHECK_EQ(9, access_check_data.count); |
+ { |
+ v8::TryCatch try_catch(isolate); |
+ CompileRun("Object.getOwnPropertyDescriptor(checked, '15')"); |
+ CHECK(try_catch.HasCaught()); |
+ } |
+ CHECK_EQ(6, access_check_data.count); |
} |