Bug 1883107 - Limit MessageTask blocking in fuzzing. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D207715
This commit is contained in:
Christian Holler (:decoder) 2024-04-19 15:28:19 +00:00
Родитель 3f7021a448
Коммит 5a7f33de56
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -1604,9 +1604,13 @@ nsresult MessageChannel::MessageTask::Run() {
return NS_OK;
}
Channel()->AssertWorkerThread();
mMonitor->AssertSameMonitor(*Channel()->mMonitor);
#ifdef FUZZING_SNAPSHOT
if (!mIsFuzzMsg) {
if (fuzzing::Nyx::instance().started()) {
if (fuzzing::Nyx::instance().started() && XRE_IsParentProcess() &&
Channel()->IsCrossProcess()) {
// Once we started fuzzing, prevent non-fuzzing tasks from being
// run and potentially blocking worker threads.
//
@ -1622,8 +1626,6 @@ nsresult MessageChannel::MessageTask::Run() {
}
#endif
Channel()->AssertWorkerThread();
mMonitor->AssertSameMonitor(*Channel()->mMonitor);
proxy = Channel()->Listener()->GetLifecycleProxy();
Channel()->RunMessage(proxy, *this);