Skip to content

Commit 9d80199

Browse files
maclover7targos
authored andcommittedAug 11, 2018
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 e1dcb79 commit 9d80199

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed
 

‎lib/vm.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@
2323

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

3736
class Script extends ContextifyScript {
3837
constructor(code, options = {}) {

‎src/env.h

-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ struct PackageConfig {
346346
V(tls_wrap_constructor_function, v8::Function) \
347347
V(tty_constructor_template, v8::FunctionTemplate) \
348348
V(udp_constructor_function, v8::Function) \
349-
V(vm_parsing_context_symbol, v8::Symbol) \
350349
V(url_constructor_function, v8::Function) \
351350
V(write_wrap_template, v8::ObjectTemplate)
352351

‎src/node_contextify.cc

-10
Original file line numberDiff line numberDiff line change
@@ -608,16 +608,6 @@ class ContextifyScript : public BaseObject {
608608

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

623613

0 commit comments

Comments
 (0)
Please sign in to comment.