Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1816983002: Add a setting to allow window object reuse across a top-level initial navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698