![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump node in DEPS to v22.15.0 * inspector: fix GN build https://github.com/nodejs/node/pull/56798 * test: search cctest files https://github.com/nodejs/node/pull/56791 * crypto: fix missing OPENSSL_NO_ENGINE guard https://github.com/nodejs/node/pull/57012 * test,crypto: make tests work for BoringSSL https://github.com/nodejs/node/pull/57021 * module: use synchronous hooks for preparsing in import(cjs) https://github.com/nodejs/node/pull/55698 * deps: update simdjson to 3.12.0 https://github.com/nodejs/node/pull/56874 * build: remove explicit linker call to libm on macOS https://github.com/nodejs/node/pull/56901 * test: make eval snapshot comparison more flexible https://github.com/nodejs/node/pull/57020 * src: allow embedder customization of OOMErrorHandler https://github.com/nodejs/node/pull/57325 * src: do not pass nullptr to std::string ctor https://github.com/nodejs/node/pull/57354 * src: lock the isolate properly in IsolateData destructor https://github.com/nodejs/node/pull/57031 * chore: shrink --trace-atomics-wait patch * chore: fixup patch indices * build: fix GN build failure https://github.com/nodejs/node/pull/57013 * crypto: expose security levels https://github.com/nodejs/node/pull/56601 * zlib: add zstd support https://github.com/nodejs/node/pull/52100 * test: move crypto related common utilities in common/crypto https://github.com/nodejs/node/pull/56714 * cli: move --trace-atomics-wait to eol https://github.com/nodejs/node/pull/52747 * test: disable test-https-client-renegotiation-limit BoringSSL doesn't support caller-initiated renegotiation - see https://source.chromium.org/chromium/chromium/src/+/main:third_party/boringssl/src/ssl/ssl_lib.cc;l=1627-1631 --------- 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 6c337232149ccb8bdb1188e72d59a052b1cb79c1..44ad4a480a33a2c39494a7d961318270a25620d8 100644
|
|
--- a/src/node_binding.cc
|
|
+++ b/src/node_binding.cc
|
|
@@ -653,6 +653,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 eb1364cb01a2bea52bce768056e73b0f3a86ae35..d421a2773403e7b22fcca2fcf8275ef2d9654c55 100644
|
|
--- a/src/node_binding.h
|
|
+++ b/src/node_binding.h
|
|
@@ -146,6 +146,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
|