Index: Source/core/frame/Location.cpp |
diff --git a/Source/core/frame/Location.cpp b/Source/core/frame/Location.cpp |
index d4a076188474de6ccae549ad8930933a6a661427..8ff96249f5d704bf27052a62a94bfb0fae4caf97 100644 |
--- a/Source/core/frame/Location.cpp |
+++ b/Source/core/frame/Location.cpp |
@@ -248,12 +248,12 @@ void Location::reload(LocalDOMWindow* callingWindow) |
void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow) |
{ |
ASSERT(m_frame); |
- LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, callingWindow->document()); |
- if (!frame) |
+ Frame* frame = m_frame->findFrameForNavigation(nullAtom, callingWindow->frame()); |
+ if (!frame || !frame->isLocalFrame()) |
return; |
// FIXME: setLocation() probably belongs on DOMWindow, since you can trigger |
// navigations across different origins. |
- frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow); |
+ toLocalFrame(frame)->localDOMWindow()->setLocation(url, callingWindow, enteredWindow); |
} |
} // namespace blink |