Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
index 69aae26cc7439d356c027922de5f987807095437..7e16d00fd4349095b0ecf936916eaaeac5ccee47 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
@@ -46,6 +46,7 @@ |
#include "bindings/core/v8/V8PagePopupControllerBinding.h" |
#include "bindings/core/v8/V8PrivateProperty.h" |
#include "bindings/core/v8/V8Window.h" |
+#include "core/dom/Modulator.h" |
#include "core/frame/LocalFrame.h" |
#include "core/frame/csp/ContentSecurityPolicy.h" |
#include "core/html/DocumentNameCollection.h" |
@@ -409,6 +410,17 @@ void WindowProxy::updateActivityLogger() { |
: KURL())); |
} |
+void WindowProxy::updateModuleResolver() { |
+ if (!m_frame->isLocalFrame()) |
+ return; |
+ if (Document* document = toLocalFrame(m_frame)->document()) { |
+ if (Modulator* modulator = document->ensureModulator()) { |
haraken
2017/01/06 05:47:58
I'm wondering if Modulator is a per-document thing
kouhei (in TOK)
2017/01/11 01:41:57
Done.
|
+ m_scriptState->perContextData()->setModuleResolver( |
+ modulator->scriptModuleResolver()); |
+ } |
+ } |
+} |
+ |
void WindowProxy::setSecurityToken(SecurityOrigin* origin) { |
// If two tokens are equal, then the SecurityOrigins canAccess each other. |
// If two tokens are not equal, then we have to call canAccess. |
@@ -464,6 +476,7 @@ void WindowProxy::updateDocument() { |
return; |
updateActivityLogger(); |
+ updateModuleResolver(); |
updateDocumentProperty(); |
updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin()); |
} |