From e732b4ce5c32467988dadd639a325350b4b96f22 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 11 May 2018 08:27:20 +0200 Subject: [PATCH] src: use unqualified names in node_contextify.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the usage of qualified names for consistency. PR-URL: https://github.com/nodejs/node/pull/20669 Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- src/node_contextify.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index da1eecf1666d80..fa2c86e809542c 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -63,6 +63,7 @@ using v8::Uint8Array; using v8::UnboundScript; using v8::Value; using v8::WeakCallbackInfo; +using v8::WeakCallbackType; // The vm module executes code in a sandboxed environment with a different // global object than the rest of the code. This is achieved by applying @@ -103,7 +104,7 @@ ContextifyContext::ContextifyContext( // Allocation failure or maximum call stack size reached if (context_.IsEmpty()) return; - context_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter); + context_.SetWeak(this, WeakCallback, WeakCallbackType::kParameter); } @@ -420,7 +421,7 @@ void ContextifyContext::PropertyDefinerCallback( return; Local context = ctx->context(); - v8::Isolate* isolate = context->GetIsolate(); + Isolate* isolate = context->GetIsolate(); auto attributes = PropertyAttribute::None; bool is_declared = @@ -453,13 +454,13 @@ void ContextifyContext::PropertyDefinerCallback( if (desc.has_get() || desc.has_set()) { PropertyDescriptor desc_for_sandbox( - desc.has_get() ? desc.get() : v8::Undefined(isolate).As(), - desc.has_set() ? desc.set() : v8::Undefined(isolate).As()); + desc.has_get() ? desc.get() : Undefined(isolate).As(), + desc.has_set() ? desc.set() : Undefined(isolate).As()); define_prop_on_sandbox(&desc_for_sandbox); } else { Local value = - desc.has_value() ? desc.value() : v8::Undefined(isolate).As(); + desc.has_value() ? desc.value() : Undefined(isolate).As(); if (desc.has_writable()) { PropertyDescriptor desc_for_sandbox(value, desc.writable());