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

Unified Diff: Source/core/dom/TreeScope.cpp

Issue 49613005: Have TreeScrope::adoptIfNeeded() take a reference instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/dom/TreeScope.h ('k') | Source/core/dom/TreeScopeAdopter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScope.cpp
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
index a921aa5b5013302e8128ef938f44785d8960190d..8c11f4df2c039ffa5c5ad33d2d4a391e45a5606a 100644
--- a/Source/core/dom/TreeScope.cpp
+++ b/Source/core/dom/TreeScope.cpp
@@ -333,13 +333,12 @@ bool TreeScope::applyAuthorStyles() const
return !rootNode()->isShadowRoot() || toShadowRoot(rootNode())->applyAuthorStyles();
}
-void TreeScope::adoptIfNeeded(Node* node)
+void TreeScope::adoptIfNeeded(Node& node)
{
ASSERT(this);
- ASSERT(node);
- ASSERT(!node->isDocumentNode());
- ASSERT_WITH_SECURITY_IMPLICATION(!node->m_deletionHasBegun);
- TreeScopeAdopter adopter(node, this);
+ ASSERT(!node.isDocumentNode());
+ ASSERT_WITH_SECURITY_IMPLICATION(!node.m_deletionHasBegun);
+ TreeScopeAdopter adopter(node, *this);
if (adopter.needsScopeChange())
adopter.execute();
}
« no previous file with comments | « Source/core/dom/TreeScope.h ('k') | Source/core/dom/TreeScopeAdopter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698