★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/c09872b749Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

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 <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>
  • Loading branch information...
maclover7 authored and rvagg committed Jul 30, 2018
1 parent f8bc5d6 commit c09872b749af5db16dd9e8caab9b9afb3f1a26f9
Showing with 1 addition and 13 deletions.
  1. +1 −2 lib/vm.js
  2. +0 −1 src/env.h
  3. +0 −10 src/node_contextify.cc
@@ -23,16 +23,15 @@

const {
ContextifyScript,
kParsingContext,
makeContext,
isContext: _isContext,
} = process.binding('contextify');

const {
ERR_INVALID_ARG_TYPE,
ERR_OUT_OF_RANGE
} = require('internal/errors').codes;
const { isUint8Array } = require('internal/util/types');
const kParsingContext = Symbol('script parsing context');

class Script extends ContextifyScript {
constructor(code, options = {}) {
@@ -346,7 +346,6 @@ struct PackageConfig {
V(tls_wrap_constructor_function, v8::Function) \
V(tty_constructor_template, v8::FunctionTemplate) \
V(udp_constructor_function, v8::Function) \
V(vm_parsing_context_symbol, v8::Symbol) \
V(url_constructor_function, v8::Function) \
V(write_wrap_template, v8::ObjectTemplate)

@@ -608,16 +608,6 @@ class ContextifyScript : public BaseObject {

target->Set(class_name, script_tmpl->GetFunction());
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();
}


0 comments on commit c09872b

Please sign in to comment.
You can’t perform that action at this time.