Index: Source/core/dom/Node.h |
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h |
index 5831fdda7f7dbfea3b726784d99ef0b9229e72ab..8157bfcb4e9e51ab97112a31545eaff3fd13c9a1 100644 |
--- a/Source/core/dom/Node.h |
+++ b/Source/core/dom/Node.h |
@@ -481,17 +481,16 @@ public: |
unsigned nodeIndex() const; |
// Returns the DOM ownerDocument attribute. This method never returns NULL, except in the case |
- // of (1) a Document node or (2) a DocumentType node that is not used with any Document yet. |
+ // of a Document node. |
Document* ownerDocument() const; |
- // Returns the document associated with this node. This method never returns NULL, except in the case |
- // of a DocumentType node that is not used with any Document yet. A Document node returns itself. |
+ // FIXME: This should return a reference. |
+ // Returns the document associated with this node. This method never returns 0. |
+ // A Document node returns itself. |
Document* document() const |
{ |
ASSERT(this); |
- // FIXME: below ASSERT is useful, but prevents the use of document() in the constructor or destructor |
- // due to the virtual function call to nodeType(). |
- ASSERT(documentInternal() || (nodeType() == DOCUMENT_TYPE_NODE && !inDocument())); |
+ ASSERT(documentInternal()); |
return documentInternal(); |
} |