mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Override WillReleaseScriptContext
This commit is contained in:
@@ -52,11 +52,16 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver {
|
||||
// content::RenderFrameObserver:
|
||||
void DidCreateScriptContext(v8::Handle<v8::Context> context,
|
||||
int extension_group,
|
||||
int world_id) {
|
||||
int world_id) override {
|
||||
renderer_client_->DidCreateScriptContext(
|
||||
render_frame()->GetWebFrame(), context);
|
||||
}
|
||||
|
||||
void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override {
|
||||
renderer_client_->WillReleaseScriptContext(context);
|
||||
}
|
||||
|
||||
private:
|
||||
AtomRendererClient* renderer_client_;
|
||||
|
||||
@@ -162,6 +167,10 @@ void AtomRendererClient::DidCreateScriptContext(
|
||||
node_bindings_->LoadEnvironment(env);
|
||||
}
|
||||
|
||||
void AtomRendererClient::WillReleaseScriptContext(
|
||||
v8::Handle<v8::Context> context) {
|
||||
}
|
||||
|
||||
bool AtomRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
const GURL& url,
|
||||
const std::string& http_method,
|
||||
|
||||
@@ -24,6 +24,7 @@ class AtomRendererClient : public content::ContentRendererClient,
|
||||
|
||||
void DidCreateScriptContext(blink::WebFrame* frame,
|
||||
v8::Handle<v8::Context> context);
|
||||
void WillReleaseScriptContext(v8::Handle<v8::Context> context);
|
||||
|
||||
private:
|
||||
enum NodeIntegration {
|
||||
|
||||
Reference in New Issue
Block a user