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

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

Issue 182053002: Have Node::highestAncestor() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload Created 6 years, 10 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/HTMLImageElement.cpp ('k') | Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageConsoleAgent.cpp
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp
index 122b636fb73a7bbf97b35afa22659664a7829689..195f16caa42b9ba6a152fb22f95a2f9d6cc5c477 100644
--- a/Source/core/inspector/PageConsoleAgent.cpp
+++ b/Source/core/inspector/PageConsoleAgent.cpp
@@ -75,11 +75,11 @@ void PageConsoleAgent::addInspectedNode(ErrorString* errorString, int nodeId)
return;
}
while (node->isInShadowTree()) {
- Node* ancestor = node->highestAncestor();
- if (!ancestor->isShadowRoot() || toShadowRoot(ancestor)->type() == ShadowRoot::AuthorShadowRoot)
+ Node& ancestor = node->highestAncestor();
+ if (!ancestor.isShadowRoot() || toShadowRoot(ancestor).type() == ShadowRoot::AuthorShadowRoot)
break;
// User agent shadow root, keep climbing up.
- node = toShadowRoot(ancestor)->host();
+ node = toShadowRoot(ancestor).host();
}
m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(new InspectableNode(node)));
}
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698