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

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

Issue 942963004: Remove internal use of v8::AccessType, always pass v8::ACCESS_HAS instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove the distinction between named/indexed access checks, always pass "undefined" as "name" Created 5 years, 10 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
« no previous file with comments | « test/cctest/test-api.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-interceptors.cc
diff --git a/test/cctest/test-api-interceptors.cc b/test/cctest/test-api-interceptors.cc
index a2acb24d76472796542fd424b0d20b0b3cec17fa..2667d24f4602a0e0b09a605e1aa5431b0fd00f67 100644
--- a/test/cctest/test-api-interceptors.cc
+++ b/test/cctest/test-api-interceptors.cc
@@ -2934,16 +2934,8 @@ struct AccessCheckData {
};
-bool SimpleNamedAccessChecker(Local<v8::Object> global, Local<Value> name,
- v8::AccessType type, Local<Value> data) {
- auto access_check_data = GetWrappedObject<AccessCheckData>(data);
- access_check_data->count++;
- return access_check_data->result;
-}
-
-
-bool SimpleIndexedAccessChecker(Local<v8::Object> global, uint32_t index,
- v8::AccessType type, Local<Value> data) {
+bool SimpleAccessChecker(Local<v8::Object> global, Local<Value> name,
+ v8::AccessType type, Local<Value> data) {
auto access_check_data = GetWrappedObject<AccessCheckData>(data);
access_check_data->count++;
return access_check_data->result;
@@ -3015,7 +3007,7 @@ THREADED_TEST(NamedAllCanReadInterceptor) {
auto checked = v8::ObjectTemplate::New(isolate);
checked->SetAccessCheckCallbacks(
- SimpleNamedAccessChecker, nullptr,
+ SimpleAccessChecker, nullptr,
BuildWrappedObject<AccessCheckData>(isolate, &access_check_data), false);
context->Global()->Set(v8_str("intercepted_0"), intercepted_0->NewInstance());
@@ -3081,7 +3073,7 @@ THREADED_TEST(IndexedAllCanReadInterceptor) {
auto checked = v8::ObjectTemplate::New(isolate);
checked->SetAccessCheckCallbacks(
- nullptr, SimpleIndexedAccessChecker,
+ SimpleAccessChecker, nullptr,
BuildWrappedObject<AccessCheckData>(isolate, &access_check_data), false);
context->Global()->Set(v8_str("intercepted_0"), intercepted_0->NewInstance());
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698