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

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

Issue 919473004: Make DOMParser create documents with a context document set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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/core/xml/DOMParser.cpp » ('j') | Source/core/xml/DOMParser.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/DOMParser.h
diff --git a/Source/core/xml/DOMParser.h b/Source/core/xml/DOMParser.h
index 13841fb992d093ea08075a01cb7b06e9d3f7ce48..a4930bcf9b1fe69cae8d3cbb02ae55466d2f5aa5 100644
--- a/Source/core/xml/DOMParser.h
+++ b/Source/core/xml/DOMParser.h
@@ -32,9 +32,9 @@ class Document;
class DOMParser final : public RefCountedWillBeGarbageCollected<DOMParser>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static PassRefPtrWillBeRawPtr<DOMParser> create()
+ static PassRefPtrWillBeRawPtr<DOMParser> create(Document& document)
{
- return adoptRefWillBeNoop(new DOMParser);
+ return adoptRefWillBeNoop(new DOMParser(document));
}
PassRefPtrWillBeRawPtr<Document> parseFromString(const String&, const String& type);
@@ -42,7 +42,9 @@ public:
void trace(Visitor*) { }
private:
- DOMParser() { }
+ DOMParser(Document&);
+
+ WeakPtrWillBeWeakMember<Document> m_contextDocument;
Jens Widell 2015/02/11 07:53:01 I'm not exactly familiar with this particular flav
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/xml/DOMParser.cpp » ('j') | Source/core/xml/DOMParser.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698