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

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

Issue 1153583006: Use LookupIterator for GetElementAttributes and friends (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
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);
}
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/webkit/fast/js/primitive-property-access-edge-cases-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698