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

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

Issue 1807033003: Rewrite how RemoteFrameOwners retain life. (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
Index: third_party/WebKit/Source/web/WebFrame.cpp
diff --git a/third_party/WebKit/Source/web/WebFrame.cpp b/third_party/WebKit/Source/web/WebFrame.cpp
index 959255bdd566ce3b4819674c92d5bbfb0dc1dfc8..528378db7b1b9531e3660f6d1bcfa3f9c2d63aba 100644
--- a/third_party/WebKit/Source/web/WebFrame.cpp
+++ b/third_party/WebKit/Source/web/WebFrame.cpp
@@ -18,7 +18,7 @@
#include "public/web/WebFrameOwnerProperties.h"
#include "public/web/WebSandboxFlags.h"
#include "web/OpenedFrameTracker.h"
-#include "web/RemoteBridgeFrameOwner.h"
+#include "web/RemoteFrameOwner.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebRemoteFrameImpl.h"
#include <algorithm>
@@ -72,6 +72,13 @@ bool WebFrame::swap(WebFrame* frame)
AtomicString name = oldFrame->tree().name();
AtomicString uniqueName = oldFrame->tree().uniqueName();
FrameOwner* owner = oldFrame->owner();
+#if !ENABLE(OILPAN)
+ // Persistence of a remote frame owner is complicated in the pre-Oilpan
+ // world. Please see RemoteFrameOwner::setContentFrame() for the details.
+ RefPtr<RemoteFrameOwner> remoteOwnerProtector;
+ if (owner && owner->isRemote())
+ remoteOwnerProtector = toRemoteFrameOwner(owner);
+#endif
v8::HandleScope handleScope(v8::Isolate::GetCurrent());
HashMap<DOMWrapperWorld*, v8::Local<v8::Object>> globals;
@@ -129,7 +136,7 @@ void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags)
// for frames with a remote owner.
FrameOwner* owner = toImplBase()->frame()->owner();
ASSERT(owner);
- toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags));
+ toRemoteFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags));
}
bool WebFrame::shouldEnforceStrictMixedContentChecking() const

Powered by Google App Engine
This is Rietveld 408576698