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))); |
} |