Changeset 248006 in webkit
- Timestamp:
- Jul 30, 2019 8:40:01 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r247936 r248006 1 2019-07-30 Truitt Savell <tsavell@apple.com> 2 3 Unreviewed, rolling out r247932. 4 5 Broke 8 API tests across all platforms. 6 7 Reverted changeset: 8 9 "Fix non-thread safe use of WeakPtr under 10 sendSecItemRequest()" 11 https://bugs.webkit.org/show_bug.cgi?id=200249 12 https://trac.webkit.org/changeset/247932 13 1 14 2019-07-29 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/Source/WebKit/Shared/mac/SecItemShim.cpp
r247932 r248006 65 65 } 66 66 67 static WorkQueue& workQueue() 68 { 69 static WorkQueue* workQueue; 70 static dispatch_once_t onceToken; 71 dispatch_once(&onceToken, ^{ 72 workQueue = &WorkQueue::create("com.apple.WebKit.SecItemShim").leakRef(); 73 74 }); 75 76 return *workQueue; 77 } 78 67 79 static Optional<SecItemResponseData> sendSecItemRequest(SecItemRequestData::Type requestType, CFDictionaryRef query, CFDictionaryRef attributesToMatch = 0) 68 80 { 81 if (!globalNetworkProcess()) 82 return WTF::nullopt; 83 69 84 Optional<SecItemResponseData> response; 70 85 71 86 BinarySemaphore semaphore; 72 RunLoop::main().dispatch([&] {73 if (!globalNetworkProcess()) {74 semaphore.signal();75 return;76 }77 globalNetworkProcess()->parentProcessConnection()->sendWithAsyncReply(Messages::SecItemShimProxy::SecItemRequest(SecItemRequestData(requestType, query, attributesToMatch)), [&](auto reply) {78 if (reply)79 response = WTFMove(*reply);80 87 81 semaphore.signal(); 82 }); 88 globalNetworkProcess()->parentProcessConnection()->sendWithReply(Messages::SecItemShimProxy::SecItemRequest(SecItemRequestData(requestType, query, attributesToMatch)), 0, workQueue(), [&response, &semaphore](auto reply) { 89 if (reply) 90 response = WTFMove(std::get<0>(*reply)); 91 92 semaphore.signal(); 83 93 }); 84 94 -
trunk/Source/WebKit/UIProcess/mac/SecItemShimProxy.cpp
r247932 r248006 57 57 } 58 58 59 void SecItemShimProxy::secItemRequest(const SecItemRequestData& request, CompletionHandler<void(Optional<SecItemResponseData>&&)>&& response) 59 void SecItemShimProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 60 { 61 } 62 63 void SecItemShimProxy::secItemRequest(const SecItemRequestData& request, CompletionHandler<void(SecItemResponseData&&)>&& response) 60 64 { 61 65 switch (request.type()) { -
trunk/Source/WebKit/UIProcess/mac/SecItemShimProxy.h
r247932 r248006 47 47 // IPC::Connection::WorkQueueMessageReceiver 48 48 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; 49 void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; 49 50 50 void secItemRequest(const SecItemRequestData&, CompletionHandler<void( Optional<SecItemResponseData>&&)>&&);51 void secItemRequest(const SecItemRequestData&, CompletionHandler<void(SecItemResponseData&&)>&&); 51 52 52 53 Ref<WorkQueue> m_queue; -
trunk/Source/WebKit/UIProcess/mac/SecItemShimProxy.messages.in
r247932 r248006 24 24 25 25 #if ENABLE(SEC_ITEM_SHIM) 26 SecItemRequest(WebKit::SecItemRequestData request) -> ( Optional<WebKit::SecItemResponseData> response) Async26 SecItemRequest(WebKit::SecItemRequestData request) -> (WebKit::SecItemResponseData response) Synchronous 27 27 #endif 28 28
Note: See TracChangeset
for help on using the changeset viewer.