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.
Created attachment 343369 [details] Patch
Created attachment 343402 [details] Patch
Created attachment 343403 [details] Patch
Comment on attachment 343403 [details] Patch Clearing flags on attachment: 343403 Committed r233117: <https://trac.webkit.org/changeset/233117>
All reviewed patches have been landed. Closing bug.
<rdar://problem/41389563>