fix: use context counter as contextId (backport 3-0-x)

For sandboxed renderer it may not have a node::Environment in the context,
using a increasing counter as contextId works for all cases.
This commit is contained in:
Cheng Zhao 2018-07-19 13:29:47 +09:00 committed by Jeremy Apthorp
parent 8d9775b0b1
commit 136cf389e8
10 changed files with 68 additions and 25 deletions

View file

@ -21,7 +21,7 @@ class RendererClientBase : public content::ContentRendererClient {
~RendererClientBase() override;
virtual void DidCreateScriptContext(v8::Handle<v8::Context> context,
content::RenderFrame* render_frame) = 0;
content::RenderFrame* render_frame);
virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context,
content::RenderFrame* render_frame) = 0;
virtual void DidClearWindowObject(content::RenderFrame* render_frame);