Expose builtin v8 modules to AtomSandboxedRendererClient
- Adapt node.cc code that implements `process.binding` to create a similar object in AtomSandboxedRendererClient. - Replace the ipc binding object passed to `lib/sandboxed_renderer/init.js` by the new binding object. - Refactor the initialization script to use this new object to fetch the ipc binding and store as a hidden value using the `v8_util` module. This change also required applying a patch to node.js, so the submodule commit was updated.
This commit is contained in:
parent
85d66d2413
commit
d78f3cae7b
7 changed files with 89 additions and 31 deletions
|
@ -21,9 +21,9 @@ class AtomSandboxedRendererClient : public content::ContentRendererClient {
|
|||
v8::Handle<v8::Context> context, content::RenderFrame* render_frame);
|
||||
void WillReleaseScriptContext(
|
||||
v8::Handle<v8::Context> context, content::RenderFrame* render_frame);
|
||||
void InvokeBindingCallback(v8::Handle<v8::Context> context,
|
||||
std::string callback_name,
|
||||
std::vector<v8::Handle<v8::Value>> args);
|
||||
void InvokeIpcCallback(v8::Handle<v8::Context> context,
|
||||
std::string callback_name,
|
||||
std::vector<v8::Handle<v8::Value>> args);
|
||||
// content::ContentRendererClient:
|
||||
void RenderFrameCreated(content::RenderFrame*) override;
|
||||
void RenderViewCreated(content::RenderView*) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue