Changeset 228152 in webkit
- Timestamp:
- Feb 5, 2018 10:50:24 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r228151 r228152 1 2018-02-05 Chris Dumez <cdumez@apple.com> 2 3 Avoid unnecessarily constructing RunLoops for GC AutomaticThreads in Connection::sendMessage() after r228001 4 https://bugs.webkit.org/show_bug.cgi?id=182494 5 <rdar://problem/37147632> 6 7 Reviewed by Ryosuke Niwa. 8 9 Somebody fixed a GC crash in r228001 by allowing RunLoop::current() to be called from a 10 GC thread. However, this is still unnecessarily inefficient. Calling RunLoop::current() 11 will construct RunLoops for background GC threads (WTF::AutomaticThreads). This patches 12 updates the IPC code to call isMainThread() instead of RunLoop::isMain() in 13 Connection::sendMessage(). This should mean the same thing since this code runs in 14 WebKit2 and should be more efficient as it ends up simply calling pthread_main_np(), 15 without constructing a RunLoop. 16 17 * Platform/IPC/Connection.cpp: 18 (IPC::Connection::sendMessage): 19 1 20 2018-02-05 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Source/WebKit/Platform/IPC/Connection.cpp
r227566 r228152 380 380 return false; 381 381 382 if ( RunLoop::isMain() && m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting && !encoder->isSyncMessage() && !(encoder->messageReceiverName() == "IPC")) {382 if (isMainThread() && m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting && !encoder->isSyncMessage() && !(encoder->messageReceiverName() == "IPC")) { 383 383 uint64_t syncRequestID; 384 384 auto wrappedMessage = createSyncMessageEncoder("IPC", "WrappedAsyncMessageForTesting", encoder->destinationID(), syncRequestID);
Note: See TracChangeset
for help on using the changeset viewer.