Skip to content

Commit 7b81e4b

Browse files
domenicrvagg
authored andcommitted
vm: remove unnecessary access checks
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]>
1 parent 659dadd commit 7b81e4b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/node_contextify.cc

-18
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ class ContextifyContext {
208208
GlobalPropertyDeleterCallback,
209209
GlobalPropertyEnumeratorCallback,
210210
CreateDataWrapper(env));
211-
object_template->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
212-
GlobalPropertyIndexedAccessCheck);
213211

214212
Local<Context> ctx = Context::New(env->isolate(), nullptr, object_template);
215213
if (!ctx.IsEmpty())
@@ -343,22 +341,6 @@ class ContextifyContext {
343341
}
344342

345343

346-
static bool GlobalPropertyNamedAccessCheck(Local<Object> host,
347-
Local<Value> key,
348-
AccessType type,
349-
Local<Value> data) {
350-
return true;
351-
}
352-
353-
354-
static bool GlobalPropertyIndexedAccessCheck(Local<Object> host,
355-
uint32_t key,
356-
AccessType type,
357-
Local<Value> data) {
358-
return true;
359-
}
360-
361-
362344
static void GlobalPropertyGetterCallback(
363345
Local<String> property,
364346
const PropertyCallbackInfo<Value>& args) {

0 commit comments

Comments
 (0)