File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 62
62
#include " third_party/WebKit/public/web/WebSecurityOrigin.h"
63
63
#include " third_party/WebKit/public/web/WebSecurityPolicy.h"
64
64
#include " third_party/WebKit/public/web/WebView.h"
65
+ #include " gin/public/context_holder.h"
66
+ #include " gin/public/gin_embedders.h"
67
+
65
68
// #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
66
69
#include " content/common/dom_storage/dom_storage_map.h"
67
70
@@ -233,6 +236,15 @@ void ShellContentRendererClient::DidCreateScriptContext(
233
236
VLOG (1 ) << " DidCreateScriptContext: " << url;
234
237
InstallNodeSymbols (frame, context, url);
235
238
creating_first_context_ = false ;
239
+
240
+ #if 1 // defined(NW_IMPLEMENTATION)
241
+ v8::Local<v8::Context> node_context =
242
+ v8::Local<v8::Context>::New (context->GetIsolate (), node::g_context);
243
+ // need to stay sync with V8PerContextData.h
244
+ int v8ContextPerContextDataIndex = static_cast <int >(gin::kPerContextDataStartIndex + gin::kEmbedderBlink );
245
+ node_context->SetAlignedPointerInEmbedderData (v8ContextPerContextDataIndex,
246
+ context->GetAlignedPointerFromEmbedderData (v8ContextPerContextDataIndex));
247
+ #endif
236
248
}
237
249
238
250
bool ShellContentRendererClient::goodForNode (blink::WebFrame* frame)
You can’t perform that action at this time.
0 commit comments