Changeset 260347 in webkit
- Timestamp:
- Apr 19, 2020 7:18:32 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r260334 r260347 1 2020-04-19 David Kilzer <ddkilzer@apple.com> 2 3 [IPC hardening] Use MESSAGE_CHECK in WebPageProxy::loadRecentSearches() and WebPageProxy::saveRecentSearches() 4 <https://webkit.org/b/210683> 5 <rdar://problem/59240446> 6 7 Reviewed by Geoffrey Garen. 8 9 * UIProcess/Cocoa/WebPageProxyCocoa.mm: 10 (MESSAGE_CHECK): Add. 11 (MESSAGE_CHECK_COMPLETION): Add. 12 (WebKit::WebPageProxy::saveRecentSearches): 13 (WebKit::WebPageProxy::loadRecentSearches): 14 - Replace boolean check of const String& with MESSAGE_CHECK. 15 1 16 2020-04-18 Darin Adler <darin@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
r260182 r260347 1 1 /* 2 * Copyright (C) 2014-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 #import "APIAttachment.h" 30 30 #import "APIUIClient.h" 31 #import "Connection.h" 31 32 #import "DataDetectionResult.h" 32 33 #import "InsertTextOptions.h" … … 55 56 #endif 56 57 58 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection()) 59 #define MESSAGE_CHECK_COMPLETION(assertion, completion) MESSAGE_CHECK_COMPLETION_BASE(assertion, process().connection(), completion) 60 57 61 namespace WebKit { 58 62 using namespace WebCore; … … 67 71 void WebPageProxy::saveRecentSearches(const String& name, const Vector<WebCore::RecentSearch>& searchItems) 68 72 { 69 if (!name) { 70 // FIXME: This should be a message check. 71 return; 72 } 73 MESSAGE_CHECK(!name.isNull()); 73 74 74 75 WebCore::saveRecentSearches(name, searchItems); … … 77 78 void WebPageProxy::loadRecentSearches(const String& name, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler) 78 79 { 79 if (!name) { 80 // FIXME: This should be a message check. 81 return completionHandler({ }); 82 } 80 MESSAGE_CHECK_COMPLETION(!name.isNull(), completionHandler({ })); 83 81 84 82 completionHandler(WebCore::loadRecentSearches(name)); … … 391 389 392 390 } // namespace WebKit 391 392 #undef MESSAGE_CHECK_COMPLETION 393 #undef MESSAGE_CHECK
Note: See TracChangeset
for help on using the changeset viewer.