Skip to content

Commit bd2ee60

Browse files
committed
src: remove unused env->vm_parsing_context_symbol
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: #22034 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 34fb560 commit bd2ee60

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

lib/vm.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323

2424
const {
2525
ContextifyScript,
26-
kParsingContext,
2726
makeContext,
2827
isContext: _isContext,
2928
} = process.binding('contextify');
30-
3129
const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes;
3230
const { isUint8Array } = require('internal/util/types');
3331
const { validateInt32, validateUint32 } = require('internal/validators');
32+
const kParsingContext = Symbol('script parsing context');
3433

3534
class Script extends ContextifyScript {
3635
constructor(code, options = {}) {

src/env.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ struct PackageConfig {
359359
V(tls_wrap_constructor_function, v8::Function) \
360360
V(tty_constructor_template, v8::FunctionTemplate) \
361361
V(udp_constructor_function, v8::Function) \
362-
V(vm_parsing_context_symbol, v8::Symbol) \
363362
V(url_constructor_function, v8::Function) \
364363
V(write_wrap_template, v8::ObjectTemplate)
365364

src/node_contextify.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -609,16 +609,6 @@ class ContextifyScript : public BaseObject {
609609

610610
target->Set(class_name, script_tmpl->GetFunction());
611611
env->set_script_context_constructor_template(script_tmpl);
612-
613-
Local<Symbol> parsing_context_symbol =
614-
Symbol::New(env->isolate(),
615-
FIXED_ONE_BYTE_STRING(env->isolate(),
616-
"script parsing context"));
617-
env->set_vm_parsing_context_symbol(parsing_context_symbol);
618-
target->Set(env->context(),
619-
FIXED_ONE_BYTE_STRING(env->isolate(), "kParsingContext"),
620-
parsing_context_symbol)
621-
.FromJust();
622612
}
623613

624614

0 commit comments

Comments
 (0)