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 <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
domenic authored and rvagg committed Jul 30, 2015
1 parent 65dd834 commit 29556eb
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 29556eb

Please sign in to comment.