WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185124
SubresourceLoader::didFail() should only log message if state is Initialized
https://bugs.webkit.org/show_bug.cgi?id=185124
Summary
SubresourceLoader::didFail() should only log message if state is Initialized
Daniel Bates
Reported
2018-04-29 11:59:04 PDT
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.
Attachments
Patch
(2.30 KB, patch)
2018-06-22 14:38 PDT
,
Woodrow Wang
no flags
Details
Formatted Diff
Diff
Patch
(2.65 KB, patch)
2018-06-22 17:32 PDT
,
Woodrow Wang
no flags
Details
Formatted Diff
Diff
Patch
(2.65 KB, patch)
2018-06-22 17:40 PDT
,
Woodrow Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Woodrow Wang
Comment 1
2018-06-22 14:38:21 PDT
Created
attachment 343369
[details]
Patch
Woodrow Wang
Comment 2
2018-06-22 17:32:44 PDT
Created
attachment 343402
[details]
Patch
Woodrow Wang
Comment 3
2018-06-22 17:40:40 PDT
Created
attachment 343403
[details]
Patch
WebKit Commit Bot
Comment 4
2018-06-22 18:22:10 PDT
Comment on
attachment 343403
[details]
Patch Clearing flags on attachment: 343403 Committed
r233117
: <
https://trac.webkit.org/changeset/233117
>
WebKit Commit Bot
Comment 5
2018-06-22 18:22:12 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2018-06-22 18:23:17 PDT
<
rdar://problem/41389563
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug