зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1600130 - Sync HTTP fuzzing target with background thread. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D56694 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
eb3cb04d9d
Коммит
878aa4ec9b
|
@ -218,6 +218,16 @@ static int FuzzingRunNetworkHttp(const uint8_t* data, size_t size) {
|
|||
// Wait for StopRequest
|
||||
gStreamListener->waitUntilDone();
|
||||
|
||||
bool mainPingBack = false;
|
||||
|
||||
NS_DispatchBackgroundTask(NS_NewRunnableFunction("Dummy", [&]() {
|
||||
NS_DispatchToMainThread(NS_NewRunnableFunction("Dummy", [&]() {
|
||||
mainPingBack = true;
|
||||
}));
|
||||
}));
|
||||
|
||||
SpinEventLoopUntil([&]() -> bool { return mainPingBack; });
|
||||
|
||||
channelRef = do_GetWeakReference(gHttpChannel);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче