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

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

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed a null check Created 6 years, 9 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
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index de39b4afa0c8a82d62de2e41ed2c81e99dbb6fd5..10b245a729caa2ce3ddcf71c3d6b17d02dbc5cac 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -1533,7 +1533,8 @@ PassRefPtr<TypeBuilder::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node* n
if (node->isFrameOwnerElement()) {
HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(node);
- if (LocalFrame* frame = frameOwner->contentFrame())
+ LocalFrame* frame = (frameOwner->contentFrame() && frameOwner->contentFrame()->isLocalFrame()) ? toLocalFrame(frameOwner->contentFrame()) : 0;
+ if (frame)
value->setFrameId(m_pageAgent->frameId(frame));
if (Document* doc = frameOwner->contentDocument())
value->setContentDocument(buildObjectForNode(doc, 0, nodesMap));
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698