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

Unified Diff: Source/core/xml/XMLSerializer.h

Issue 534583002: Implemented XMLSerializer in PrivateScript. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/core/xml/XMLSerializer.h
diff --git a/Source/core/xml/XMLSerializer.h b/Source/core/xml/XMLSerializer.h
index 658835bd8db202142688d9d15249b7d595876fd3..5cdc33820256382a07a26b8afeba78e5fd8f2dd7 100644
--- a/Source/core/xml/XMLSerializer.h
+++ b/Source/core/xml/XMLSerializer.h
@@ -28,15 +28,16 @@
namespace blink {
+class Document;
class ExceptionState;
class Node;
class XMLSerializer FINAL : public RefCountedWillBeGarbageCollected<XMLSerializer>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static PassRefPtrWillBeRawPtr<XMLSerializer> create()
+ static PassRefPtrWillBeRawPtr<XMLSerializer> create(Document& document)
{
- return adoptRefWillBeNoop(new XMLSerializer);
+ return adoptRefWillBeNoop(new XMLSerializer(document));
}
String serializeToString(Node*, ExceptionState&);
@@ -44,7 +45,11 @@ public:
void trace(Visitor*) { }
private:
- XMLSerializer() { }
+ XMLSerializer(Document& document)
+ : m_document(&document)
+ { }
+
+ RefPtrWillBeMember<Document> m_document;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698