mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
* chore: bump node in DEPS to v24.12.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: fixup patch indices * chore: re-add accidentally removed sslv23 test * chore: fixup crypto patch rebase * test: make buffer sizes 32bit-aware in test-internal-util-construct-sab https://github.com/nodejs/node/pull/61026 * src: add internal binding for constructing SharedArrayBuffers https://github.com/nodejs/node/pull/60497 * chore: bump node in DEPS to v24.13.0 * chore: fixup patch indices * chore: fixup sandboxed pointers patch * tls: route callback exceptions through error handlers https://github.com/nodejs-private/node-private/pull/782 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
39 lines
1.5 KiB
Diff
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
|