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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Android/Mac fixes Created 6 years, 6 months 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/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 10d432c7c3f350d9ff0e6cc8c16cf66657fc3a7b..d94bd36b934fef751112d6be502f56ae7686ff12 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -1777,13 +1777,13 @@ void InspectorDOMAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
// FIXME: If "frame" is always guarenteed to be in the same Page as loader->frame()
// then all we need to check here is loader->frame()->isMainFrame()
// and we don't need "frame" at all.
- LocalFrame* mainFrame = frame->page()->mainFrame();
+ Frame* mainFrame = frame->page()->mainFrame();
if (loader->frame() != mainFrame) {
invalidateFrameOwnerElement(loader->frame());
return;
}
- setDocument(mainFrame->document());
+ setDocument(mainFrame->isLocalFrame() ? toLocalFrame(mainFrame)->document() : 0);
}
void InspectorDOMAgent::didInsertDOMNode(Node* node)

Powered by Google App Engine
This is Rietveld 408576698