Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index 0eb295eb957c3f684cf3e37a0385ced090dc1e5f..b7ac1c8778f3f24a4e9e42c2d20367bcc10462ea 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; |
} |
@@ -1708,7 +1708,7 @@ void LocalDOMWindow::setLocation(const String& urlString, LocalDOMWindow* callin |
return; |
ASSERT(frame()); |
- if (!activeDocument->canNavigate(*frame())) |
+ if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*frame())) |
dcheng
2015/01/08 00:44:59
Why does this one require a null check of frame(),
Nate Chapin
2015/01/08 17:10:52
Um.....because this is the only one required to ma
dcheng
2015/01/08 23:20:19
Any chance you have a crash stack handy? I'm curio
|
return; |
LocalFrame* firstFrame = enteredWindow->frame(); |
@@ -1876,7 +1876,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); |