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

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

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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
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

Powered by Google App Engine
This is Rietveld 408576698