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

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

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address dcheng's comments 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/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);

Powered by Google App Engine
This is Rietveld 408576698