summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-01-30 22:21:07 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-02-02 05:40:47 +0800
commit39d922123c02aecc2e289a08e3bdb9515a7b193a (patch)
tree6ee18ed6096ced4e248836a89c27ecf0da91a6a3 /src/env.h
parent1d996f58af3067617a67c0af8f86f014ed4d139c (diff)
downloadandroid-node-v8-39d922123c02aecc2e289a08e3bdb9515a7b193a.tar.gz
android-node-v8-39d922123c02aecc2e289a08e3bdb9515a7b193a.tar.bz2
android-node-v8-39d922123c02aecc2e289a08e3bdb9515a7b193a.zip
lib: save primordials during bootstrap and use it in builtins
This patches changes the `safe_globals` internal module into a script that gets run during bootstrap and saves JavaScript builtins (primordials) into an object that is available for all other builtin modules to access lexically later. PR-URL: https://github.com/nodejs/node/pull/25816 Refs: https://github.com/nodejs/node/issues/18795 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index 25f1cd0689..f76fb14990 100644
--- a/src/env.h
+++ b/src/env.h
@@ -256,6 +256,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2;
V(port2_string, "port2") \
V(port_string, "port") \
V(preference_string, "preference") \
+ V(primordials_string, "primordials") \
V(priority_string, "priority") \
V(process_string, "process") \
V(promise_string, "promise") \
@@ -366,6 +367,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2;
V(performance_entry_template, v8::Function) \
V(pipe_constructor_template, v8::FunctionTemplate) \
V(process_object, v8::Object) \
+ V(primordials, v8::Object) \
V(promise_reject_callback, v8::Function) \
V(promise_wrap_template, v8::ObjectTemplate) \
V(sab_lifetimepartner_constructor_template, v8::FunctionTemplate) \