1d9a4ab02c
* chore: bump node in DEPS to v18.13.0 * child_process: validate arguments for null bytes https://github.com/nodejs/node/pull/44782 * bootstrap: merge main thread and worker thread initializations https://github.com/nodejs/node/pull/44869 * module: ensure relative requires work from deleted directories https://github.com/nodejs/node/pull/42384 * src: add support for externally shared js builtins https://github.com/nodejs/node/issues/44000 * lib: disambiguate `native module` to `binding` https://github.com/nodejs/node/pull/45673 * test: convert test-debugger-pid to async/await https://github.com/nodejs/node/pull/45179 * deps: upgrade to libuv 1.44.2 https://github.com/nodejs/node/pull/42340 * src: fix cppgc incompatibility in v8 https://github.com/nodejs/node/pull/43521 * src: use qualified `std::move` call in node_http2 https://github.com/nodejs/node/pull/45555 * build: fix env.h for cpp20 https://github.com/nodejs/node/pull/45516 * test: remove experimental-wasm-threads flag https://github.com/nodejs/node/pull/45074 * src: iwyu in cleanup_queue.cc https://github.com/nodejs/node/pull/44983 * src: add missing include for `std::all_of` https://github.com/nodejs/node/pull/45541 * deps: update ICU to 72.1 https://github.com/nodejs/node/pull/45068 * chore: fixup patch indices * chore: remove errant semicolons - https://github.com/nodejs/node/pull/44179 - https://github.com/nodejs/node/pull/44193 * src: add support for externally shared js builtins https://github.com/nodejs/node/pull/44376 * chore: add missing GN filenames * deps: update nghttp2 to 1.51.0 https://github.com/nodejs/node/pull/45537 * chore: disable more Node.js snapshot tests The Snapshot feature is currently disabled * chore: disable ICU timezone tests Node.js uses a different version of ICU than Electron so they will often be out of sync. * chore: disable threadpool event tracing test Event tracing is not enabled in embedded Node.js * chore: fixup patch indices * chore: comments from review Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Thiago de Arruda <tpadilha84@gmail.com>
|
|
Date: Mon, 6 Mar 2017 10:42:34 -0300
|
|
Subject: Expose `get_linked_module` function
|
|
|
|
This is a requirement for electron/electron#8815, which exposes some linked
|
|
modules to sandboxed renderers.
|
|
|
|
TODO(codebytere): remove and replace with a public facing API.
|
|
|
|
diff --git a/src/node_binding.cc b/src/node_binding.cc
|
|
index a7a325e591eba3daf80bebb11fc3cd83891b627d..c4e6347f6f302b46fe4569f543335e426cd4ded5 100644
|
|
--- a/src/node_binding.cc
|
|
+++ b/src/node_binding.cc
|
|
@@ -608,6 +608,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
|
|
args.GetReturnValue().Set(exports);
|
|
}
|
|
|
|
+node_module* get_linked_module(const char* name) {
|
|
+ return FindModule(modlist_linked, name, NM_F_LINKED);
|
|
+}
|
|
+
|
|
void GetLinkedBinding(const FunctionCallbackInfo<Value>& args) {
|
|
Environment* env = Environment::GetCurrent(args);
|
|
|
|
diff --git a/src/node_binding.h b/src/node_binding.h
|
|
index 5bced5b41431dc7838d1a30774a1a41ff797290e..4233ee968fb4b3b5456997cbf1450ecf07392455 100644
|
|
--- a/src/node_binding.h
|
|
+++ b/src/node_binding.h
|
|
@@ -91,6 +91,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
void GetLinkedBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
void DLOpen(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
+NODE_EXTERN node_module* get_linked_module(const char *name);
|
|
+
|
|
} // namespace binding
|
|
|
|
} // namespace node
|