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

Unified Diff: Source/WebCore/html/parser/HTMLConstructionSite.cpp

Issue 7162001: Merge 88434 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 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
« no previous file with comments | « LayoutTests/fast/parser/document-write-onload-clear-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/parser/HTMLConstructionSite.cpp
===================================================================
--- Source/WebCore/html/parser/HTMLConstructionSite.cpp (revision 88827)
+++ Source/WebCore/html/parser/HTMLConstructionSite.cpp (working copy)
@@ -83,13 +83,14 @@
} // namespace
template<typename ChildType>
-PassRefPtr<ChildType> HTMLConstructionSite::attach(ContainerNode* parent, PassRefPtr<ChildType> prpChild)
+PassRefPtr<ChildType> HTMLConstructionSite::attach(ContainerNode* rawParent, PassRefPtr<ChildType> prpChild)
{
RefPtr<ChildType> child = prpChild;
+ RefPtr<ContainerNode> parent = rawParent;
// FIXME: It's confusing that HTMLConstructionSite::attach does the magic
// redirection to the foster parent but HTMLConstructionSite::attachAtSite
- // doesn't. It feels like we're missing a concept somehow.
+ // doesn't. It feels like we're missing a concept somehow.
if (shouldFosterParent()) {
fosterParent(child.get());
ASSERT(child->attached() || !child->parentNode() || !child->parentNode()->attached());
@@ -103,11 +104,6 @@
if (!child->parentNode())
return child.release();
- // It's slightly unfortunate that we need to hold a reference to child
- // here to call attach(). We should investigate whether we can rely on
- // |parent| to hold a ref at this point. In the common case (at least
- // for elements), however, we'll get to use this ref in the stack of
- // open elements.
if (parent->attached() && !child->attached())
child->attach();
return child.release();
« no previous file with comments | « LayoutTests/fast/parser/document-write-onload-clear-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698