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

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

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check in History.cpp 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
« no previous file with comments | « Source/core/frame/History.cpp ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 8308af425526cba350a8ed8837019d83e340bc9a..4f95823e964768e8cb7e919d2e382ae9a5f215b0 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);
« no previous file with comments | « Source/core/frame/History.cpp ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698