Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index a8c7f5c59251eedb3712d86b8bbe7b854872f388..e02fb8a87acbc8ed43b95142b2ca264b6d411e06 100644 |
--- a/Source/core/frame/LocalDOMWindow.cpp |
+++ b/Source/core/frame/LocalDOMWindow.cpp |
@@ -1012,7 +1012,7 @@ void LocalDOMWindow::close(ExecutionContext* context) |
if (!activeDocument) |
return; |
- if (!activeDocument->canNavigate(*frame())) |
+ if (!activeDocument->frame()->canNavigate(*frame())) |
return; |
} |
@@ -1720,7 +1720,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(); |
@@ -1888,7 +1888,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()->canNavigate(*localTargetFrame)) |
return nullptr; |
KURL completedURL = firstFrame->document()->completeURL(urlString); |