Chromium Code Reviews| Index: Source/core/frame/Location.cpp |
| diff --git a/Source/core/frame/Location.cpp b/Source/core/frame/Location.cpp |
| index 023edca250dada2eaa939ddaa91d73aa7c5ec5bf..6c9a666cbe742a373642f5c63a43ff5959a8bcaf 100644 |
| --- a/Source/core/frame/Location.cpp |
| +++ b/Source/core/frame/Location.cpp |
| @@ -234,7 +234,9 @@ void Location::replace(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWin |
| if (!m_frame) |
| return; |
| // Note: We call LocalDOMWindow::setLocation directly here because replace() always operates on the current frame. |
| - m_frame->domWindow()->setLocation(url, callingWindow, enteredWindow, LockHistoryAndBackForwardList); |
| + // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger |
| + // navigations across different origins. |
| + m_frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow, LockHistoryAndBackForwardList); |
| } |
| void Location::reload(LocalDOMWindow* callingWindow) |
| @@ -249,10 +251,13 @@ void Location::reload(LocalDOMWindow* callingWindow) |
| void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow) |
| { |
| ASSERT(m_frame); |
| + // FIXME: This is probably wrong. |
|
dcheng
2014/10/31 03:20:41
I'm going to remove this FIXME in my next patchset
|
| LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, callingWindow->document()); |
| if (!frame) |
| return; |
| - frame->domWindow()->setLocation(url, callingWindow, enteredWindow); |
| + // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger |
| + // navigations across different origins. |
| + frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow); |
| } |
| } // namespace blink |