Title: [210562] trunk/Source/WebCore
- Revision
- 210562
- Author
- [email protected]
- Date
- 2017-01-10 15:09:44 -0800 (Tue, 10 Jan 2017)
Log Message
Missing logging in IconLoader::startLoading
https://bugs.webkit.org/show_bug.cgi?id=166904
Reviewed by Sam Weinig.
The LOG_ERROR in startLoading references 'resourceRequest', which has
been WTF::Moved as part of a preceding function call. As such, the
logging statement doesn't print out a possibly useful URL. Fix this by
making a copy of the URL before it's affected by the Move.
No new tests -- change only affects logging code.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (210561 => 210562)
--- trunk/Source/WebCore/ChangeLog 2017-01-10 22:31:06 UTC (rev 210561)
+++ trunk/Source/WebCore/ChangeLog 2017-01-10 23:09:44 UTC (rev 210562)
@@ -1,3 +1,20 @@
+2017-01-10 Keith Rollin <[email protected]>
+
+ Missing logging in IconLoader::startLoading
+ https://bugs.webkit.org/show_bug.cgi?id=166904
+
+ Reviewed by Sam Weinig.
+
+ The LOG_ERROR in startLoading references 'resourceRequest', which has
+ been WTF::Moved as part of a preceding function call. As such, the
+ logging statement doesn't print out a possibly useful URL. Fix this by
+ making a copy of the URL before it's affected by the Move.
+
+ No new tests -- change only affects logging code.
+
+ * loader/icon/IconLoader.cpp:
+ (WebCore::IconLoader::startLoading):
+
2017-01-10 Wenson Hsieh <[email protected]>
Implement "proximity" scroll snapping
Modified: trunk/Source/WebCore/loader/icon/IconLoader.cpp (210561 => 210562)
--- trunk/Source/WebCore/loader/icon/IconLoader.cpp 2017-01-10 22:31:06 UTC (rev 210561)
+++ trunk/Source/WebCore/loader/icon/IconLoader.cpp 2017-01-10 23:09:44 UTC (rev 210562)
@@ -76,6 +76,12 @@
ResourceRequest resourceRequest = m_documentLoader ? m_url : m_frame->loader().icon().url();
resourceRequest.setPriority(ResourceLoadPriority::Low);
+#if !ERROR_DISABLED
+ // Copy this because we may want to access it after transferring the
+ // `resourceRequest` to the `request`. If we don't, then the LOG_ERROR
+ // below won't print a URL.
+ auto resourceRequestURL = resourceRequest.url();
+#endif
// ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
CachedResourceRequest request(WTFMove(resourceRequest), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowStoredCredentials, ClientCredentialPolicy::CannotAskClientForCredentials, FetchOptions::Credentials::Omit, DoSecurityCheck, FetchOptions::Mode::NoCors, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching));
@@ -87,7 +93,7 @@
if (m_resource)
m_resource->addClient(*this);
else
- LOG_ERROR("Failed to start load for icon at url %s", resourceRequest.url().string().ascii().data());
+ LOG_ERROR("Failed to start load for icon at url %s", resourceRequestURL.string().ascii().data());
}
void IconLoader::stopLoading()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes