0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00

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 <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Domenic Denicola 2015-05-22 20:02:20 -04:00 committed by Rod Vagg
parent 659dadd410
commit 7b81e4ba36

View File

@ -208,8 +208,6 @@ class ContextifyContext {
GlobalPropertyDeleterCallback, GlobalPropertyDeleterCallback,
GlobalPropertyEnumeratorCallback, GlobalPropertyEnumeratorCallback,
CreateDataWrapper(env)); CreateDataWrapper(env));
object_template->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
GlobalPropertyIndexedAccessCheck);
Local<Context> ctx = Context::New(env->isolate(), nullptr, object_template); Local<Context> ctx = Context::New(env->isolate(), nullptr, object_template);
if (!ctx.IsEmpty()) if (!ctx.IsEmpty())
@ -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( static void GlobalPropertyGetterCallback(
Local<String> property, Local<String> property,
const PropertyCallbackInfo<Value>& args) { const PropertyCallbackInfo<Value>& args) {