Title: [228202] branches/safari-605-branch/Source/WebKit
- Revision
- 228202
- Author
- [email protected]
- Date
- 2018-02-06 16:53:30 -0800 (Tue, 06 Feb 2018)
Log Message
Cherry-pick r228152. rdar://problem/37293023
Modified Paths
Diff
Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (228201 => 228202)
--- branches/safari-605-branch/Source/WebKit/ChangeLog 2018-02-07 00:32:24 UTC (rev 228201)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog 2018-02-07 00:53:30 UTC (rev 228202)
@@ -1,5 +1,28 @@
2018-02-06 Jason Marcell <[email protected]>
+ Cherry-pick r228152. rdar://problem/37293023
+
+ 2018-02-05 Chris Dumez <[email protected]>
+
+ Avoid unnecessarily constructing RunLoops for GC AutomaticThreads in Connection::sendMessage() after r228001
+ https://bugs.webkit.org/show_bug.cgi?id=182494
+ <rdar://problem/37147632>
+
+ Reviewed by Ryosuke Niwa.
+
+ Somebody fixed a GC crash in r228001 by allowing RunLoop::current() to be called from a
+ GC thread. However, this is still unnecessarily inefficient. Calling RunLoop::current()
+ will construct RunLoops for background GC threads (WTF::AutomaticThreads). This patches
+ updates the IPC code to call isMainThread() instead of RunLoop::isMain() in
+ Connection::sendMessage(). This should mean the same thing since this code runs in
+ WebKit2 and should be more efficient as it ends up simply calling pthread_main_np(),
+ without constructing a RunLoop.
+
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::sendMessage):
+
+2018-02-06 Jason Marcell <[email protected]>
+
Cherry-pick r228151. rdar://problem/37264535
2018-02-05 Ryosuke Niwa <[email protected]>
Modified: branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.cpp (228201 => 228202)
--- branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.cpp 2018-02-07 00:32:24 UTC (rev 228201)
+++ branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.cpp 2018-02-07 00:53:30 UTC (rev 228202)
@@ -379,7 +379,7 @@
if (!isValid())
return false;
- if (RunLoop::isMain() && m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting && !encoder->isSyncMessage() && !(encoder->messageReceiverName() == "IPC")) {
+ if (isMainThread() && m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting && !encoder->isSyncMessage() && !(encoder->messageReceiverName() == "IPC")) {
uint64_t syncRequestID;
auto wrappedMessage = createSyncMessageEncoder("IPC", "WrappedAsyncMessageForTesting", encoder->destinationID(), syncRequestID);
wrappedMessage->setFullySynchronousModeForTesting();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes