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

Unified Diff: src/isolate.cc

Issue 2045273002: Remove deprecated access check callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/api.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 3af3675b7ed3492eba1071bd8d998c8b4d2c99b4..035a626acd2eff1ba4439ae8b322a2fe3ba93af6 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -881,18 +881,12 @@ bool Isolate::MayAccess(Handle<Context> accessing_context,
HandleScope scope(this);
Handle<Object> data;
v8::AccessCheckCallback callback = nullptr;
- v8::NamedSecurityCallback named_callback = nullptr;
{ DisallowHeapAllocation no_gc;
AccessCheckInfo* access_check_info = GetAccessCheckInfo(this, receiver);
if (!access_check_info) return false;
Object* fun_obj = access_check_info->callback();
callback = v8::ToCData<v8::AccessCheckCallback>(fun_obj);
data = handle(access_check_info->data(), this);
- if (!callback) {
- fun_obj = access_check_info->named_callback();
- named_callback = v8::ToCData<v8::NamedSecurityCallback>(fun_obj);
- if (!named_callback) return false;
- }
}
LOG(this, ApiSecurityCheck());
@@ -900,13 +894,8 @@ bool Isolate::MayAccess(Handle<Context> accessing_context,
{
// Leaving JavaScript.
VMState<EXTERNAL> state(this);
- if (callback) {
- return callback(v8::Utils::ToLocal(accessing_context),
- v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(data));
- }
- Handle<Object> key = factory()->undefined_value();
- return named_callback(v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(key),
- v8::ACCESS_HAS, v8::Utils::ToLocal(data));
+ return callback(v8::Utils::ToLocal(accessing_context),
+ v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(data));
}
}
« no previous file with comments | « src/api.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698