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:
parent
659dadd410
commit
7b81e4ba36
@ -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())
|
||||
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user