Ignore:
Timestamp:
Aug 30, 2013, 7:30:12 AM (12 years ago)
Author:
[email protected]
Message:

Node::document() should return a reference.
<https://webkit.org/b/120496>

Reviewed by Antti Koivisto.

Now that orphan DocumentType nodes also have document pointers, it's no longer
possible to have a null Node::document().

Cement this by making document() return a reference, and remove the various
null checks exposed by this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/xml/XPathExpression.cpp

    r127757 r154877  
    7171    evaluationContext.position = 1;
    7272    evaluationContext.hadTypeConversionError = false;
    73     RefPtr<XPathResult> result = XPathResult::create(contextNode->document(), m_topExpression->evaluate());
     73    RefPtr<XPathResult> result = XPathResult::create(&contextNode->document(), m_topExpression->evaluate());
    7474    evaluationContext.node = 0; // Do not hold a reference to the context node, as this may prevent the whole document from being destroyed in time.
    7575
Note: See TracChangeset for help on using the changeset viewer.