Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
index 370c44a30bad8879fa0612e3b9ae7985b640753b..343809cca42eb6a374839d90807d86f60222f6a3 100644 |
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
@@ -1556,6 +1556,8 @@ void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, |
// during init(). Note that this may dispatch JS events; the frame may be |
// detached after init() returns. |
frame()->init(); |
+ if (frame() && frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() && !parent() && !opener() && frame()->settings()->shouldReuseGlobalForUnownedMainFrame()) |
+ frame()->document()->getSecurityOrigin()->grantUniversalAccess(); |
} |
RawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, |