Skip to content

Commit

Permalink
vm: remove unnecessary access checks
Browse files Browse the repository at this point in the history
No reason to install access checks if they're always going to return
true.

PR-URL: #1773
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
domenic authored and rvagg committed Jul 24, 2015
1 parent d019cb3 commit bf4f6ca
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ class ContextifyContext {
GlobalPropertyDeleterCallback,
GlobalPropertyEnumeratorCallback,
CreateDataWrapper(env));
object_template->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
GlobalPropertyIndexedAccessCheck);

Local<Context> ctx = Context::New(env->isolate(), nullptr, object_template);
if (!ctx.IsEmpty())
Expand Down Expand Up @@ -343,22 +341,6 @@ class ContextifyContext {
}


static bool GlobalPropertyNamedAccessCheck(Local<Object> host,
Local<Value> key,
AccessType type,
Local<Value> data) {
return true;
}


static bool GlobalPropertyIndexedAccessCheck(Local<Object> host,
uint32_t key,
AccessType type,
Local<Value> data) {
return true;
}


static void GlobalPropertyGetterCallback(
Local<String> property,
const PropertyCallbackInfo<Value>& args) {
Expand Down

0 comments on commit bf4f6ca

Please sign in to comment.