[Webkit-unassigned] [Bug 131652] New: Remove unnecessary null checking in NavigatorContentUtils
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 14 17:38:20 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=131652
Summary: Remove unnecessary null checking in
NavigatorContentUtils
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: gyuyoung.kim at samsung.com
According to my investigation, it looks there is no change that document can be null.So, it seems to me that we don't need to check if document is null when frame is existed.
In Frame.cpp, m_doc is set in Frame::setDocument(). I think m_doc can't be null. Even when I try to find same null check, I couldn't find it in WebKit.
void Frame::setDocument(PassRefPtr<Document> newDocument)
{
ASSERT(!newDocument || newDocument->frame() == this);
if (m_doc && m_doc->hasLivingRenderTree() && !m_doc->inPageCache())
m_doc->prepareForDestruction();
m_doc = newDocument.get();
ASSERT(!m_doc || m_doc->domWindow());
ASSERT(!m_doc || m_doc->domWindow()->frame() == this);
// Don't use m_doc because it can be overwritten and we want to guarantee
// that the document is not destroyed during this function call.
if (newDocument)
newDocument->didBecomeCurrentDocumentInFrame();
}
--
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