Changeset 249806 in webkit
- Timestamp:
- Sep 12, 2019 6:52:59 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r249805 r249806 1 2019-09-12 Michael Catanzaro <mcatanzaro@igalia.com> 2 3 Fix accidental copies in NetworkLoadChecker.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=199528 5 6 Reviewed by Youenn Fablet. 7 8 Coverity noticed that we are copying a ResourceRequest and a ContentExtensionResultOrError 9 in NetworkLoadChecker::checkRequest by mistake, when the intent was to move them as rvalue 10 references. 11 12 * NetworkProcess/NetworkLoadChecker.cpp: 13 (WebKit::NetworkLoadChecker::checkRequest): 14 * NetworkProcess/NetworkLoadChecker.h: 15 1 16 2019-09-12 Joseph Pecoraro <pecoraro@apple.com> 2 17 -
trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp
r249501 r249806 226 226 ResourceRequest originalRequest = request; 227 227 228 applyHTTPSUpgradeIfNeeded(WTFMove(request), [this, weakThis = makeWeakPtr(*this), client, handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto request) mutable {228 applyHTTPSUpgradeIfNeeded(WTFMove(request), [this, weakThis = makeWeakPtr(*this), client, handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto&& request) mutable { 229 229 if (!weakThis) 230 230 return handler({ ResourceError { ResourceError::Type::Cancellation }}); … … 242 242 243 243 #if ENABLE(CONTENT_EXTENSIONS) 244 this->processContentRuleListsForLoad(WTFMove(request), [this, weakThis = WTFMove(weakThis), handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto result) mutable {244 this->processContentRuleListsForLoad(WTFMove(request), [this, weakThis = WTFMove(weakThis), handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto&& result) mutable { 245 245 if (!result.has_value()) { 246 246 ASSERT(result.error().isCancellation()); -
trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.h
r249714 r249806 119 119 }; 120 120 using ContentExtensionResultOrError = Expected<ContentExtensionResult, WebCore::ResourceError>; 121 using ContentExtensionCallback = CompletionHandler<void(ContentExtensionResultOrError )>;121 using ContentExtensionCallback = CompletionHandler<void(ContentExtensionResultOrError&&)>; 122 122 void processContentRuleListsForLoad(WebCore::ResourceRequest&&, ContentExtensionCallback&&); 123 123 #endif
Note: See TracChangeset
for help on using the changeset viewer.