src: remove unused env->vm_parsing_context_symbol
Stopped being used via 77b52fd58f7398a81999c81afd21fe2e156c0766, was originally added in d932e802317f9f61bd10988189fa43ed03ad0f61. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: https://github.com/nodejs/node/pull/22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
34fb560c92
commit
bd2ee60eae
@ -23,14 +23,13 @@
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
ContextifyScript,
|
ContextifyScript,
|
||||||
kParsingContext,
|
|
||||||
makeContext,
|
makeContext,
|
||||||
isContext: _isContext,
|
isContext: _isContext,
|
||||||
} = process.binding('contextify');
|
} = process.binding('contextify');
|
||||||
|
|
||||||
const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes;
|
const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes;
|
||||||
const { isUint8Array } = require('internal/util/types');
|
const { isUint8Array } = require('internal/util/types');
|
||||||
const { validateInt32, validateUint32 } = require('internal/validators');
|
const { validateInt32, validateUint32 } = require('internal/validators');
|
||||||
|
const kParsingContext = Symbol('script parsing context');
|
||||||
|
|
||||||
class Script extends ContextifyScript {
|
class Script extends ContextifyScript {
|
||||||
constructor(code, options = {}) {
|
constructor(code, options = {}) {
|
||||||
|
@ -359,7 +359,6 @@ struct PackageConfig {
|
|||||||
V(tls_wrap_constructor_function, v8::Function) \
|
V(tls_wrap_constructor_function, v8::Function) \
|
||||||
V(tty_constructor_template, v8::FunctionTemplate) \
|
V(tty_constructor_template, v8::FunctionTemplate) \
|
||||||
V(udp_constructor_function, v8::Function) \
|
V(udp_constructor_function, v8::Function) \
|
||||||
V(vm_parsing_context_symbol, v8::Symbol) \
|
|
||||||
V(url_constructor_function, v8::Function) \
|
V(url_constructor_function, v8::Function) \
|
||||||
V(write_wrap_template, v8::ObjectTemplate)
|
V(write_wrap_template, v8::ObjectTemplate)
|
||||||
|
|
||||||
|
@ -609,16 +609,6 @@ class ContextifyScript : public BaseObject {
|
|||||||
|
|
||||||
target->Set(class_name, script_tmpl->GetFunction());
|
target->Set(class_name, script_tmpl->GetFunction());
|
||||||
env->set_script_context_constructor_template(script_tmpl);
|
env->set_script_context_constructor_template(script_tmpl);
|
||||||
|
|
||||||
Local<Symbol> parsing_context_symbol =
|
|
||||||
Symbol::New(env->isolate(),
|
|
||||||
FIXED_ONE_BYTE_STRING(env->isolate(),
|
|
||||||
"script parsing context"));
|
|
||||||
env->set_vm_parsing_context_symbol(parsing_context_symbol);
|
|
||||||
target->Set(env->context(),
|
|
||||||
FIXED_ONE_BYTE_STRING(env->isolate(), "kParsingContext"),
|
|
||||||
parsing_context_symbol)
|
|
||||||
.FromJust();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user