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

Unified Diff: Source/core/html/parser/HTMLFormattingElementList.cpp

Issue 298043008: [Oilpan]: Move HTMLStackItem and friends to the oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix windows build Created 6 years, 7 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/parser/HTMLFormattingElementList.h ('k') | Source/core/html/parser/HTMLStackItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLFormattingElementList.cpp
diff --git a/Source/core/html/parser/HTMLFormattingElementList.cpp b/Source/core/html/parser/HTMLFormattingElementList.cpp
index 08128d77de9c4f9488fb89ae6a42895c3295b1bf..26418debc1c995e39cc10ad764dd086e99ac4726 100644
--- a/Source/core/html/parser/HTMLFormattingElementList.cpp
+++ b/Source/core/html/parser/HTMLFormattingElementList.cpp
@@ -79,7 +79,7 @@ HTMLFormattingElementList::Bookmark HTMLFormattingElementList::bookmarkFor(Eleme
return Bookmark(&at(index));
}
-void HTMLFormattingElementList::swapTo(Element* oldElement, PassRefPtr<HTMLStackItem> newItem, const Bookmark& bookmark)
+void HTMLFormattingElementList::swapTo(Element* oldElement, PassRefPtrWillBeRawPtr<HTMLStackItem> newItem, const Bookmark& bookmark)
{
ASSERT(contains(oldElement));
ASSERT(!contains(newItem->element()));
@@ -94,7 +94,7 @@ void HTMLFormattingElementList::swapTo(Element* oldElement, PassRefPtr<HTMLStack
remove(oldElement);
}
-void HTMLFormattingElementList::append(PassRefPtr<HTMLStackItem> item)
+void HTMLFormattingElementList::append(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
{
ensureNoahsArkCondition(item.get());
m_entries.append(item);
@@ -123,7 +123,7 @@ void HTMLFormattingElementList::clearToLastMarker()
}
}
-void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackItem* newItem, Vector<HTMLStackItem*>& remainingCandidates)
+void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackItem* newItem, WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem> >& remainingCandidates)
{
ASSERT(remainingCandidates.isEmpty());
@@ -132,7 +132,7 @@ void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackIte
// Use a vector with inline capacity to avoid a malloc in the common case
// of a quickly ensuring the condition.
- Vector<HTMLStackItem*, 10> candidates;
+ WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem>, 10> candidates;
size_t newItemAttributeCount = newItem->attributes().size();
@@ -160,14 +160,14 @@ void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackIte
void HTMLFormattingElementList::ensureNoahsArkCondition(HTMLStackItem* newItem)
{
- Vector<HTMLStackItem*> candidates;
+ WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem> > candidates;
tryToEnsureNoahsArkConditionQuickly(newItem, candidates);
if (candidates.isEmpty())
return;
// We pre-allocate and re-use this second vector to save one malloc per
// attribute that we verify.
- Vector<HTMLStackItem*> remainingCandidates;
+ WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem> > remainingCandidates;
remainingCandidates.reserveInitialCapacity(candidates.size());
const Vector<Attribute>& attributes = newItem->attributes();
« no previous file with comments | « Source/core/html/parser/HTMLFormattingElementList.h ('k') | Source/core/html/parser/HTMLStackItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698