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

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index ffbc313f11f99471b5b7bd76e9dc302014200a87..15cc209d3d2c96f2fe890ef96ace548b3c5bfa84 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -1018,7 +1018,7 @@ void LocalDOMWindow::close(ExecutionContext* context)
if (!activeDocument)
return;
- if (!activeDocument->canNavigate(*frame()))
+ if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*frame()))
return;
}
@@ -1715,7 +1715,7 @@ void LocalDOMWindow::setLocation(const String& urlString, LocalDOMWindow* callin
return;
ASSERT(frame());
- if (!activeDocument->canNavigate(*frame()))
+ if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*frame()))
return;
LocalFrame* firstFrame = enteredWindow->frame();
@@ -1883,7 +1883,7 @@ PassRefPtrWillBeRawPtr<LocalDOMWindow> LocalDOMWindow::open(const String& urlStr
// FIXME: Navigating RemoteFrames is not yet supported.
if (targetFrame && targetFrame->isLocalFrame()) {
LocalFrame* localTargetFrame = toLocalFrame(targetFrame);
- if (!activeDocument->canNavigate(*localTargetFrame))
+ if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*localTargetFrame))
return nullptr;
KURL completedURL = firstFrame->document()->completeURL(urlString);

Powered by Google App Engine
This is Rietveld 408576698