Skip to content

Commit e732b4c

Browse files
danbevaddaleax
authored andcommitted
src: use unqualified names in node_contextify.cc
This commit removes the usage of qualified names for consistency. PR-URL: #20669 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 512982c commit e732b4c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/node_contextify.cc

+6-5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ using v8::Uint8Array;
6363
using v8::UnboundScript;
6464
using v8::Value;
6565
using v8::WeakCallbackInfo;
66+
using v8::WeakCallbackType;
6667

6768
// The vm module executes code in a sandboxed environment with a different
6869
// global object than the rest of the code. This is achieved by applying
@@ -103,7 +104,7 @@ ContextifyContext::ContextifyContext(
103104
// Allocation failure or maximum call stack size reached
104105
if (context_.IsEmpty())
105106
return;
106-
context_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
107+
context_.SetWeak(this, WeakCallback, WeakCallbackType::kParameter);
107108
}
108109

109110

@@ -420,7 +421,7 @@ void ContextifyContext::PropertyDefinerCallback(
420421
return;
421422

422423
Local<Context> context = ctx->context();
423-
v8::Isolate* isolate = context->GetIsolate();
424+
Isolate* isolate = context->GetIsolate();
424425

425426
auto attributes = PropertyAttribute::None;
426427
bool is_declared =
@@ -453,13 +454,13 @@ void ContextifyContext::PropertyDefinerCallback(
453454

454455
if (desc.has_get() || desc.has_set()) {
455456
PropertyDescriptor desc_for_sandbox(
456-
desc.has_get() ? desc.get() : v8::Undefined(isolate).As<Value>(),
457-
desc.has_set() ? desc.set() : v8::Undefined(isolate).As<Value>());
457+
desc.has_get() ? desc.get() : Undefined(isolate).As<Value>(),
458+
desc.has_set() ? desc.set() : Undefined(isolate).As<Value>());
458459

459460
define_prop_on_sandbox(&desc_for_sandbox);
460461
} else {
461462
Local<Value> value =
462-
desc.has_value() ? desc.value() : v8::Undefined(isolate).As<Value>();
463+
desc.has_value() ? desc.value() : Undefined(isolate).As<Value>();
463464

464465
if (desc.has_writable()) {
465466
PropertyDescriptor desc_for_sandbox(value, desc.writable());

0 commit comments

Comments
 (0)