Backed out changeset 2fb8f6f77e79 (bug 1780790) for causing build bustages on WebTaskScheduler.cpp CLOSED TREE

This commit is contained in:
Cristian Tuns 2022-07-22 12:18:01 -04:00
Родитель e0a9c22091
Коммит 67841b0865
3 изменённых файлов: 6 добавлений и 20 удалений

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

@ -1,15 +0,0 @@
<html class="reftest-wait">
<head>
<script>
function test() {
let ac = new AbortController();
scheduler.postTask(()=> { ac.abort(); throw "Foobar"; }, { signal: ac.signal });
scheduler.postTask(()=> document.documentElement.removeAttribute('class'));
}
</script>
<style>
</style>
</head>
<body onload="test()">
</body>
</html>

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

@ -267,4 +267,3 @@ skip-if(ThreadSanitizer||Android) load 1712198.html # Mysterious failure that sh
skip-if(Android) HTTP load 1728670-1.html
load 1757923.html
load 1766472.html
load 1780790.html

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

@ -109,10 +109,12 @@ bool WebTask::Run() {
MOZ_ASSERT_IF(promiseState != Promise::PromiseState::Pending,
promiseState == Promise::PromiseState::Rejected);
if (error.Failed()) {
mPromise->MaybeReject(std::move(error));
} else {
mPromise->MaybeResolve(returnVal);
if (promiseState == Promise::PromiseState::Pending) {
if (error.Failed()) {
mPromise->MaybeReject(std::move(error));
} else {
mPromise->MaybeResolve(returnVal);
}
}
MOZ_ASSERT(!isInList());