Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 50386bbd03a77eb8e157d4cab3c9d8a1cb10794a
https://github.com/WebKit/WebKit/commit/50386bbd03a77eb8e157d4cab3c9d8a1cb10794a
Author: Kimmo Kinnunen <[email protected]>
Date: 2022-10-15 (Sat, 15 Oct 2022)
Changed paths:
M Source/WebKit/Platform/IPC/Connection.cpp
M Source/WebKit/Platform/IPC/Connection.h
M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp
M Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp
Log Message:
-----------
IPC::Connection message throttling refers to main run loop
https://bugs.webkit.org/show_bug.cgi?id=246276
rdar://problem/100974660
Reviewed by Chris Dumez.
Using main run loop in the MessageThrottler makes it hard to
make Connection run loop agnostic.
Instead, just remove MessageThrottler, it represents just one
int. Store the state to Connection.
Use RunLoop::dispatch() for both cases: when the messages are
throttled and when they are not. Zero interval timers and
RunLoop::dispatchAfter(0_s) are dispatched within same
run loop iteration, and thus the test cannot test that
the throttling works as expected. The purpose of the zero
interval timer was supposedly give time for running
other tasks in run loop, but it might actually make
the dispatch task earlier than the already submitted
non-timer tasks.
* Source/WebKit/Platform/IPC/Connection.cpp:
(IPC::Connection::enableIncomingMessagesThrottling):
(IPC::Connection::getPendingMessageCountForTesting):
(IPC::Connection::numberOfMessagesToProcess):
(IPC::Connection::dispatchIncomingMessages):
(IPC::Connection::MessagesThrottler::MessagesThrottler): Deleted.
(IPC::Connection::MessagesThrottler::scheduleMessagesDispatch): Deleted.
(IPC::Connection::MessagesThrottler::numberOfMessagesToProcess): Deleted.
* Source/WebKit/Platform/IPC/Connection.h:
(IPC::Connection::isIncomingMessagesThrottlingEnabled const):
(IPC::Connection::isThrottlingIncomingMessages const):
* Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp:
(TestWebKitAPI::TEST_P):
Canonical link: https://commits.webkit.org/255579@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes