summaryrefslogtreecommitdiff
path: root/src/node_contextify.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-09-17 20:13:59 +0200
committerAnna Henningsen <anna@addaleax.net>2018-09-18 15:48:02 +0200
commit8989c76c6eff653a3abb19f4cfb3097da58b5dce (patch)
tree51fd37839e315cf6d0c1a749da598182365e174e /src/node_contextify.cc
parentdcc0c2c5c9d5bd97cc3df7fe7fd7f34c96e53b5b (diff)
downloadandroid-node-v8-8989c76c6eff653a3abb19f4cfb3097da58b5dce.tar.gz
android-node-v8-8989c76c6eff653a3abb19f4cfb3097da58b5dce.tar.bz2
android-node-v8-8989c76c6eff653a3abb19f4cfb3097da58b5dce.zip
Revert "src: implement query callbacks for vm"
This reverts commit 85c356c10eec14f96eaf92ffc9a8481b591e3652 from PR https://github.com/nodejs/node/pull/22390. See the discussion in the (proposed) fix at https://github.com/nodejs/node/pull/22836. Refs: https://github.com/nodejs/node/pull/22836 Refs: https://github.com/nodejs/node/pull/22390 Fixes: https://github.com/nodejs/node/issues/22723 PR-URL: https://github.com/nodejs/node/pull/22911 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r--src/node_contextify.cc42
1 files changed, 2 insertions, 40 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index 92e2ed9429..8b9fef5480 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -143,21 +143,19 @@ Local<Context> ContextifyContext::CreateV8Context(
NamedPropertyHandlerConfiguration config(PropertyGetterCallback,
PropertySetterCallback,
- PropertyQueryCallback,
+ PropertyDescriptorCallback,
PropertyDeleterCallback,
PropertyEnumeratorCallback,
PropertyDefinerCallback,
- PropertyDescriptorCallback,
CreateDataWrapper(env));
IndexedPropertyHandlerConfiguration indexed_config(
IndexedPropertyGetterCallback,
IndexedPropertySetterCallback,
- IndexedPropertyQueryCallback,
+ IndexedPropertyDescriptorCallback,
IndexedPropertyDeleterCallback,
PropertyEnumeratorCallback,
IndexedPropertyDefinerCallback,
- IndexedPropertyDescriptorCallback,
CreateDataWrapper(env));
object_template->SetHandler(config);
@@ -394,28 +392,6 @@ void ContextifyContext::PropertySetterCallback(
}
// static
-void ContextifyContext::PropertyQueryCallback(
- Local<Name> property,
- const PropertyCallbackInfo<Integer>& args) {
- ContextifyContext* ctx = ContextifyContext::Get(args);
-
- // Still initializing
- if (ctx->context_.IsEmpty())
- return;
-
- Local<Context> context = ctx->context();
-
- Local<Object> sandbox = ctx->sandbox();
-
- PropertyAttribute attributes;
- if (sandbox->HasOwnProperty(context, property).FromMaybe(false) &&
- sandbox->GetPropertyAttributes(context, property).To(&attributes)) {
- args.GetReturnValue().Set(attributes);
- }
-}
-
-
-// static
void ContextifyContext::PropertyDescriptorCallback(
Local<Name> property,
const PropertyCallbackInfo<Value>& args) {
@@ -561,20 +537,6 @@ void ContextifyContext::IndexedPropertySetterCallback(
}
// static
-void ContextifyContext::IndexedPropertyQueryCallback(
- uint32_t index,
- const PropertyCallbackInfo<Integer>& args) {
- ContextifyContext* ctx = ContextifyContext::Get(args);
-
- // Still initializing
- if (ctx->context_.IsEmpty())
- return;
-
- ContextifyContext::PropertyQueryCallback(
- Uint32ToName(ctx->context(), index), args);
-}
-
-// static
void ContextifyContext::IndexedPropertyDescriptorCallback(
uint32_t index,
const PropertyCallbackInfo<Value>& args) {