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

Unified Diff: Source/web/WebPageSerializerImpl.h

Issue 831263008: Oilpan: mark WebPageSerializerImpl as stack allocated. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 | « no previous file | Source/web/WebPageSerializerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPageSerializerImpl.h
diff --git a/Source/web/WebPageSerializerImpl.h b/Source/web/WebPageSerializerImpl.h
index b92aec4da781de90947aeb5eeafbb7a489c26d3e..e1816d309e6f84d9eeb53e3c34a3e19180264890 100644
--- a/Source/web/WebPageSerializerImpl.h
+++ b/Source/web/WebPageSerializerImpl.h
@@ -64,6 +64,7 @@ class WebLocalFrameImpl;
// buffer is full. See comments of WebViewDelegate::SendSerializedHtmlData
// for getting more information.
class WebPageSerializerImpl {
+ STACK_ALLOCATED();
public:
// Do serialization action. Return false means no available frame has been
// serialized, otherwise return true.
@@ -89,7 +90,7 @@ public:
private:
// Specified frame which need to be serialized;
- WebLocalFrameImpl* m_specifiedWebLocalFrameImpl;
+ RawPtrWillBeMember<WebLocalFrameImpl> m_specifiedWebLocalFrameImpl;
// Pointer of WebPageSerializerClient
WebPageSerializerClient* m_client;
// This hash map is used to map resource URL of original link to its local
@@ -110,22 +111,26 @@ private:
// Local directory name of all local resource files.
WTF::String m_localDirectoryName;
// Vector for saving all frames which need to be serialized.
- Vector<WebLocalFrameImpl*> m_frames;
+ WillBeHeapVector<RawPtrWillBeMember<WebLocalFrameImpl>> m_frames;
// Web entities conversion maps.
WebEntities m_htmlEntities;
WebEntities m_xmlEntities;
- struct SerializeDomParam {
+ class SerializeDomParam {
+ STACK_ALLOCATED();
+ public:
+ SerializeDomParam(const KURL&, const WTF::TextEncoding&, Document*, const WTF::String& directoryName);
+
const KURL& url;
const WTF::TextEncoding& textEncoding;
- Document* document;
+ RawPtrWillBeMember<Document> document;
const WTF::String& directoryName;
bool isHTMLDocument; // document.isHTMLDocument()
bool haveSeenDocType;
bool haveAddedCharsetDeclaration;
// This meta element need to be skipped when serializing DOM.
- const Element* skipMetaElement;
+ RawPtrWillBeMember<const Element> skipMetaElement;
// Flag indicates we are in script or style tag.
bool isInScriptOrStyleTag;
bool haveAddedXMLProcessingDirective;
@@ -135,8 +140,6 @@ private:
// PreActionBeforeSerializeEndTag if the function adds new contents into
// serialization stream.
bool haveAddedContentsBeforeEnd;
-
- SerializeDomParam(const KURL&, const WTF::TextEncoding&, Document*, const WTF::String& directoryName);
};
// Collect all target frames which need to be serialized.
« no previous file with comments | « no previous file | Source/web/WebPageSerializerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698