Files
electron/patches/node/expose_get_builtin_module_function.patch
electron-roller[bot] 21c6e4e8a0 chore: bump node to v24.13.0 (40-x-y) (#49188)
* chore: bump node in DEPS to v24.12.0

* chore: bump node in DEPS to v24.13.0

* src: use CP_UTF8 for wide file names on win32

https://github.com/nodejs/node/pull/60575

* test,crypto: handle a few more BoringSSL tests

https://github.com/nodejs/node/pull/59030

* chore: re-add accidentally removed sslv23 test

* test: make buffer sizes 32bit-aware in test-internal-util-construct-sab

https://github.com/nodejs/node/pull/61026

* chore: fixup patch indices

* chore: fixup crypto patch rebase

(cherry picked from commit 0b3baf0167)

* chore: fixup sandboxed pointers patch

(cherry picked from commit f52fbdbe51)

* build: try removing zero-fill sandbox patch component (#49452)

(cherry picked from commit 73377af79e)

* tls: route callback exceptions through error handlers

https://github.com/nodejs-private/node-private/pull/782
(cherry picked from commit 87bc8ebd34)

* src: add internal binding for constructing SharedArrayBuffers

https://github.com/nodejs/node/pull/60497
(cherry picked from commit ae90076267)

* chore: fixup after rebase

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-02-10 15:29:51 +01:00

39 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 5bd07e5253ae64b02ae1874226ab70c1972cf9e0..768d81a63a42d9016a42b7cdce7b6be86c59afdf 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -655,6 +655,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 a55a9c6a5787983c0477cb268ef1355162e72911..3455eb3d223a49cd73d80c72c209c26d49b769dc 100644
--- a/src/node_binding.h
+++ b/src/node_binding.h
@@ -154,6 +154,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