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

Unified Diff: Source/core/page/PageSerializer.cpp

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized 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/page/Page.cpp ('k') | Source/core/xml/XMLSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageSerializer.cpp
diff --git a/Source/core/page/PageSerializer.cpp b/Source/core/page/PageSerializer.cpp
index 31781a62e81c8c50a6e3e5795b80b589a0626052..d7f6b0ff839fb5b1a02c27b54e6b549b150d1f99 100644
--- a/Source/core/page/PageSerializer.cpp
+++ b/Source/core/page/PageSerializer.cpp
@@ -101,7 +101,7 @@ static const QualifiedName& frameOwnerURLAttributeName(const HTMLFrameOwnerEleme
class SerializerMarkupAccumulator FINAL : public MarkupAccumulator {
public:
- SerializerMarkupAccumulator(PageSerializer*, const Document&, Vector<Node*>*);
+ SerializerMarkupAccumulator(PageSerializer*, const Document&, WillBeHeapVector<RawPtrWillBeMember<Node> >*);
virtual ~SerializerMarkupAccumulator();
protected:
@@ -115,8 +115,8 @@ private:
const Document& m_document;
};
-SerializerMarkupAccumulator::SerializerMarkupAccumulator(PageSerializer* serializer, const Document& document, Vector<Node*>* nodes)
- : MarkupAccumulator(nodes, ResolveAllURLs)
+SerializerMarkupAccumulator::SerializerMarkupAccumulator(PageSerializer* serializer, const Document& document, WillBeHeapVector<RawPtrWillBeMember<Node> >* nodes)
+ : MarkupAccumulator(nodes, ResolveAllURLs, nullptr)
, m_serializer(serializer)
, m_document(document)
{
@@ -208,14 +208,14 @@ void PageSerializer::serializeFrame(LocalFrame* frame)
return;
}
- Vector<Node*> serializedNodes;
+ WillBeHeapVector<RawPtrWillBeMember<Node> > serializedNodes;
SerializerMarkupAccumulator accumulator(this, document, &serializedNodes);
String text = accumulator.serializeNodes(document, IncludeNode);
CString frameHTML = textEncoding.normalizeAndEncode(text, WTF::EntitiesForUnencodables);
m_resources->append(SerializedResource(url, document.suggestedMIMEType(), SharedBuffer::create(frameHTML.data(), frameHTML.length())));
m_resourceURLs.add(url);
- for (Vector<Node*>::iterator iter = serializedNodes.begin(); iter != serializedNodes.end(); ++iter) {
+ for (WillBeHeapVector<RawPtrWillBeMember<Node> >::iterator iter = serializedNodes.begin(); iter != serializedNodes.end(); ++iter) {
ASSERT(*iter);
Node& node = **iter;
if (!node.isElementNode())
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/xml/XMLSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698