de192c2db2
* chore: bump node in DEPS to v18.16.0 * build,test: add proper support for IBM i https://github.com/nodejs/node/pull/46739 * lib: enforce use of trailing commas https://github.com/nodejs/node/pull/46881 * src: add initial support for single executable applications https://github.com/nodejs/node/pull/45038 * lib: do not crash using workers with disabled shared array buffers https://github.com/nodejs/node/pull/41023 * src: remove shadowed variable in OptionsParser::Parse https://github.com/nodejs/node/pull/46672 * src: allow embedder control of code generation policy https://github.com/nodejs/node/pull/46368 * src: allow optional Isolate termination in node::Stop() https://github.com/nodejs/node/pull/46583 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * chore: fixup patch indices * chore: sync filenames.json * fix: add simdutf dep to src/inspector BUILD.gn - https://github.com/nodejs/node/pull/46471 - https://github.com/nodejs/node/pull/46472 * deps: replace url parser with Ada https://github.com/nodejs/node/pull/46410 * tls: support automatic DHE https://github.com/nodejs/node/pull/46978 * fixup! src: add initial support for single executable applications * http: unify header treatment https://github.com/nodejs/node/pull/46528 * fix: libc++ buffer overflow in string_view ctor https://github.com/nodejs/node/pull/46410 * test: include strace openat test https://github.com/nodejs/node/pull/46150 * fixup! fixup! src: add initial support for single executable applications --------- 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 60b5eea61cf05344de9862a028165fecdb63fd35..5093c3e53cee6d0ad9a9100b487549c3b4e7ae46 100644
|
|
--- a/src/node_binding.cc
|
|
+++ b/src/node_binding.cc
|
|
@@ -609,6 +609,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 13681bac67c64f5b9c81a034f0be1eeb2b346bb1..76898adc448c48715d8b9dc4aa782217a4fc7e05 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
|