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.
  • Loading branch information
domenic committed Jun 1, 2015
1 parent d3a01fd commit d119272
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 d119272

Please sign in to comment.