fb990ba1eb
* chore: bump node in DEPS to v16.6.0 * chore: bump node in DEPS to v16.6.1 * crypto: fix generateKeyPair with encoding 'jwk' https://github.com/nodejs/node/pull/39319 * build: add library_files to gyp variables https://github.com/nodejs/node/pull/39293 * debugger: rename internal module https://github.com/nodejs/node/pull/39378 * chore: fixup patch indices * deps: extract gtest source files to deps/googletest https://github.com/nodejs/node/pull/39386 * crypto: fix generateKeyPair with encoding 'jwk' https://github.com/nodejs/node/pull/39319 * deps: bump HdrHistogram_C to 0.11.2 https://github.com/nodejs/node/pull/39462 * fixup! deps: extract gtest source files to deps/googletest * chore: bump node in DEPS to v16.6.2 * chore: update patches * deps: reflect c-ares source tree https://github.com/nodejs/node/pull/39653 * deps: update c-ares to 1.17.2 https://github.com/nodejs/node/pull/39724 * fix: _ReadBarrier undefined symbol error on WOA arm64 * chore: update patches * chore: bump node in DEPS to v16.7.0 * deps: upgrade to libuv 1.42.0 https://github.com/nodejs/node/pull/39525 * chore: update filenames * src: remove extra semicolons outside fns * chore: fixup patch filenames * chore: sort and alphabetize disabled tests 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: PatchUp <73610968+patchup[bot]@users.noreply.github.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 3c9776e655d0e458cdd3ab7c3adafff7de339cc5..8b8389ae53608afedc9cc0ad2a6c8461b7aa893e 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
|