[Webkit-unassigned] [Bug 185124] New: SubresourceLoader::didFail() should only log message if state is Initialized
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Apr 29 11:59:04 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185124
Bug ID: 185124
Summary: SubresourceLoader::didFail() should only log message
if state is Initialized
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dbates at webkit.org
SubresourceLoader::didFail() has the followzing code:
[[
void SubresourceLoader::didFail(const ResourceError& error)
{
if (m_frame && m_frame->document() && error.isAccessControl())
m_frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, error.localizedDescription());
#if USE(QUICK_LOOK)
...
#endif
if (m_state != Initialized)
return;
ASSERT(!reachedTerminalState());
LOG(ResourceLoading, "Failed to load '%s'.\n", m_resource->url().string().latin1().data());
...
]]
The logic to log a console message should be moved after LOG() such that we only perform this logic if m_state != Initialized. Moreover, we do not need to null check m_frame once we move the code because it can never be null so long as we have not reached he terminal state.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180429/46a0bc21/attachment.html>
More information about the webkit-unassigned
mailing list