From 222c8a53cf0e40ecdc1535859f3cbd61afb4522f Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 22 May 2015 20:02:20 -0400 Subject: [PATCH] vm: remove unnecessary access checks No reason to install access checks if they're always going to return true. PR-URL: https://github.com/nodejs/io.js/pull/1773 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis --- src/node_contextify.cc | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index d93fb60c69a5f5..c5976a56ec5f6c 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -208,8 +208,6 @@ class ContextifyContext { GlobalPropertyDeleterCallback, GlobalPropertyEnumeratorCallback, CreateDataWrapper(env)); - object_template->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck, - GlobalPropertyIndexedAccessCheck); Local ctx = Context::New(env->isolate(), nullptr, object_template); if (!ctx.IsEmpty()) @@ -343,22 +341,6 @@ class ContextifyContext { } - static bool GlobalPropertyNamedAccessCheck(Local host, - Local key, - AccessType type, - Local data) { - return true; - } - - - static bool GlobalPropertyIndexedAccessCheck(Local host, - uint32_t key, - AccessType type, - Local data) { - return true; - } - - static void GlobalPropertyGetterCallback( Local property, const PropertyCallbackInfo& args) {