|
1 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Thiago de Arruda <tpadilha84@gmail.com> |
3 | 3 | Date: Mon, 6 Mar 2017 10:42:34 -0300 |
4 | | -Subject: Expose `get_builtin_module` function |
| 4 | +Subject: Expose `get_linked_module` function |
5 | 5 |
|
6 | | -This is a requirement for electron/electron#8815, which exposes some builtin |
7 | | -modules to sandboxed renderers. |
| 6 | +This is a requirement for electron/electron#8815, which exposes some linked |
| 7 | +modules to sandboxed renderers. |
8 | 8 |
|
9 | | -(cherry picked from commit 4c058a6cb5331eef1c7f51c042dd074a2d4f9234) |
| 9 | +TODO(codebytere): removed and replace with a public facing API. |
10 | 10 |
|
| 11 | +diff --git a/src/node_binding.cc b/src/node_binding.cc |
| 12 | +index 0facfc36cbcb784cd0a1802a7748dff3366710fd..db60617cebee83ac09371aa1e2200280e29bd772 100644 |
| 13 | +--- a/src/node_binding.cc |
| 14 | ++++ b/src/node_binding.cc |
| 15 | +@@ -611,6 +611,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) { |
| 16 | + args.GetReturnValue().Set(exports); |
| 17 | + } |
| 18 | + |
| 19 | ++node_module* get_linked_module(const char* name) { |
| 20 | ++ return FindModule(modlist_linked, name, NM_F_LINKED); |
| 21 | ++} |
| 22 | ++ |
| 23 | + void GetLinkedBinding(const FunctionCallbackInfo<Value>& args) { |
| 24 | + Environment* env = Environment::GetCurrent(args); |
| 25 | + |
11 | 26 | diff --git a/src/node_binding.h b/src/node_binding.h |
12 | 27 | index 42f3c5b8d00880588f442a4e724e080128c56dfe..cefb6419ebb7f5c5c79927d179eef0a790e234ad 100644 |
13 | 28 | --- a/src/node_binding.h |
|
0 commit comments