[Webkit-unassigned] [Bug 127786] Document::topDocument() should return a reference
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 28 12:19:11 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=127786
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #222473|review? |review+
Flag| |
--- Comment #3 from Darin Adler <darin at apple.com> 2014-01-28 12:16:34 PST ---
(From update of attachment 222473)
View in context: https://bugs.webkit.org/attachment.cgi?id=222473&action=review
> Source/WebCore/dom/Document.cpp:4316
> - return m_frame ? m_frame->mainFrame().document() : const_cast<Document*>(this);
> + return m_frame ? *m_frame->mainFrame().document() : const_cast<Document&>(*this);
We should make this 100% safe by null-checking MainFrame::document and falling back to this in that case too. And if we ever change MainFrame::document to return a reference we can delete that branch.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list