WebKit Bugzilla
Attachment 373527 Details for
Bug 199528
: Fix accidental copies in NetworkLoadChecker.cpp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199528-20190705150041.patch (text/plain), 3.37 KB, created by
Michael Catanzaro
on 2019-07-05 13:00:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2019-07-05 13:00:42 PDT
Size:
3.37 KB
patch
obsolete
>Subversion Revision: 246791 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4c8fee3fbb9c0ddae2517a9f5609ec77df1a8451..c25378c013525055c1dd58d3547827a5c7bb6463 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-07-05 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ Fix accidental copies in NetworkLoadChecker.cpp >+ https://bugs.webkit.org/show_bug.cgi?id=199528 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Coverity noticed that we are copying a ResourceRequest and a ContentExtensionResultOrError >+ in NetworkLoadChecker::checkRequest by mistake, when the intent was to move them as rvalue >+ references. >+ >+ * NetworkProcess/NetworkLoadChecker.cpp: >+ (WebKit::NetworkLoadChecker::checkRequest): >+ * NetworkProcess/NetworkLoadChecker.h: >+ > 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> > > Fully rename WebKitGTK+ -> WebKitGTK everywhere >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >index 409714d66726a8474aff29a160817f247967b016..a29aa6098c8987de24f49787691724ff3e8a525c 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >@@ -225,7 +225,7 @@ void NetworkLoadChecker::checkRequest(ResourceRequest&& request, ContentSecurity > { > ResourceRequest originalRequest = request; > >- applyHTTPSUpgradeIfNeeded(WTFMove(request), [this, weakThis = makeWeakPtr(*this), client, handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto request) mutable { >+ applyHTTPSUpgradeIfNeeded(WTFMove(request), [this, weakThis = makeWeakPtr(*this), client, handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto&& request) mutable { > if (!weakThis) > return handler({ ResourceError { ResourceError::Type::Cancellation }}); > >@@ -241,7 +241,7 @@ void NetworkLoadChecker::checkRequest(ResourceRequest&& request, ContentSecurity > } > > #if ENABLE(CONTENT_EXTENSIONS) >- this->processContentRuleListsForLoad(WTFMove(request), [this, weakThis = WTFMove(weakThis), handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto result) mutable { >+ this->processContentRuleListsForLoad(WTFMove(request), [this, weakThis = WTFMove(weakThis), handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto&& result) mutable { > if (!result.has_value()) { > ASSERT(result.error().isCancellation()); > handler(WTFMove(result.error())); >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.h b/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >index 57df1da4680d2584ee216aadff08de82a136bce9..a8314a892216b9d29761213c40fa4b8e664a960a 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >@@ -115,7 +115,7 @@ private: > const WebCore::ContentRuleListResults& results; > }; > using ContentExtensionResultOrError = Expected<ContentExtensionResult, WebCore::ResourceError>; >- using ContentExtensionCallback = CompletionHandler<void(ContentExtensionResultOrError)>; >+ using ContentExtensionCallback = CompletionHandler<void(ContentExtensionResultOrError&&)>; > void processContentRuleListsForLoad(WebCore::ResourceRequest&&, ContentExtensionCallback&&); > #endif >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199528
: 373527 |
373550