diff options
Diffstat (limited to 'WebCore/dom/DocumentParser.cpp')
-rw-r--r-- | WebCore/dom/DocumentParser.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/dom/DocumentParser.cpp b/WebCore/dom/DocumentParser.cpp index b80927c..cc4c61b 100644 --- a/WebCore/dom/DocumentParser.cpp +++ b/WebCore/dom/DocumentParser.cpp @@ -37,5 +37,18 @@ DocumentParser::DocumentParser(Document* document) ASSERT(document); } +DocumentParser::~DocumentParser() +{ + // Document is expected to call detach() before releasing its ref. + // This ASSERT is slightly awkward for parsers with a fragment case + // as there is no Document to release the ref. + ASSERT(!m_document); +} + +void DocumentParser::detach() +{ + m_document = 0; +} + }; |