Skip to content

Commit 7ddfca4

Browse files
committed
Backed out 8 changesets (bug 1713335) for failures on browser_policy_hardware_acceleration.js. CLOSED TREE
Backed out changeset 85042c2c36ba (bug 1713335) Backed out changeset a460cd7e818d (bug 1713335) Backed out changeset 21a7a9dbf79d (bug 1713335) Backed out changeset 9c68d8591ef3 (bug 1713335) Backed out changeset 18e3f8bf6404 (bug 1713335) Backed out changeset 5a395f40ac52 (bug 1713335) Backed out changeset b9b2e74e7530 (bug 1713335) Backed out changeset 1184c5a4b2e8 (bug 1713335)
1 parent b140242 commit 7ddfca4

File tree

4 files changed

+106
-222
lines changed

4 files changed

+106
-222
lines changed

js/src/vm/HelperThreadState.h

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,9 @@ class GlobalHelperThreadState {
166166
// pool is used.
167167
JS::HelperThreadTaskCallback dispatchTaskCallback = nullptr;
168168

169-
// The number of tasks dispatched to the external thread pool that have not
170-
// started running yet.
171-
size_t externalTasksPending_ = 0;
172-
173169
bool isInitialized_ = false;
174170

175-
bool useInternalThreadPool_ = true;
171+
bool useInternalThreadPool_;
176172

177173
ParseTask* removeFinishedParseTask(JSContext* cx, ParseTaskKind kind,
178174
JS::OffThreadToken* token);
@@ -206,8 +202,8 @@ class GlobalHelperThreadState {
206202
[[nodiscard]] bool ensureInitialized();
207203
[[nodiscard]] bool ensureThreadCount(size_t count,
208204
const AutoLockHelperThreadState& lock);
209-
void finish(AutoLockHelperThreadState& lock);
210-
void finishThreads(AutoLockHelperThreadState& lock);
205+
void finish();
206+
void finishThreads();
211207

212208
void setCpuCount(size_t count);
213209

@@ -239,9 +235,7 @@ class GlobalHelperThreadState {
239235
mozilla::TimeDuration timeout = mozilla::TimeDuration::Forever());
240236
void notifyAll(CondVar which, const AutoLockHelperThreadState&);
241237

242-
bool useInternalThreadPool(const AutoLockHelperThreadState& lock) const {
243-
return useInternalThreadPool_;
244-
}
238+
bool useInternalThreadPool(const AutoLockHelperThreadState& locked);
245239

246240
bool isTerminating(const AutoLockHelperThreadState& locked) const {
247241
return terminating_;
@@ -344,19 +338,6 @@ class GlobalHelperThreadState {
344338
return helperTasks_;
345339
}
346340

347-
bool canStartWasmCompile(const AutoLockHelperThreadState& lock,
348-
wasm::CompileMode mode);
349-
350-
bool canStartWasmTier1CompileTask(const AutoLockHelperThreadState& lock);
351-
bool canStartWasmTier2CompileTask(const AutoLockHelperThreadState& lock);
352-
bool canStartWasmTier2GeneratorTask(const AutoLockHelperThreadState& lock);
353-
bool canStartPromiseHelperTask(const AutoLockHelperThreadState& lock);
354-
bool canStartIonCompileTask(const AutoLockHelperThreadState& lock);
355-
bool canStartIonFreeTask(const AutoLockHelperThreadState& lock);
356-
bool canStartParseTask(const AutoLockHelperThreadState& lock);
357-
bool canStartCompressionTask(const AutoLockHelperThreadState& lock);
358-
bool canStartGCParallelTask(const AutoLockHelperThreadState& lock);
359-
360341
HelperThreadTask* maybeGetWasmCompile(const AutoLockHelperThreadState& lock,
361342
wasm::CompileMode mode);
362343

@@ -421,9 +402,9 @@ class GlobalHelperThreadState {
421402
JSContext* cx, JS::OffThreadToken* token);
422403

423404
bool hasActiveThreads(const AutoLockHelperThreadState&);
424-
bool canStartTasks(const AutoLockHelperThreadState& locked);
425-
void waitForAllTasks();
426-
void waitForAllTasksLocked(AutoLockHelperThreadState&);
405+
bool hasQueuedTasks(const AutoLockHelperThreadState& locked);
406+
void waitForAllThreads();
407+
void waitForAllThreadsLocked(AutoLockHelperThreadState&);
427408

428409
bool checkTaskThreadLimit(ThreadType threadType, size_t maxThreads,
429410
bool isMaster,
@@ -454,8 +435,6 @@ class GlobalHelperThreadState {
454435

455436
void dispatch(const AutoLockHelperThreadState& locked);
456437

457-
void runTask(HelperThreadTask* task, AutoLockHelperThreadState& lock);
458-
459438
public:
460439
bool submitTask(wasm::UniqueTier2GeneratorTask task);
461440
bool submitTask(wasm::CompileTask* task, wasm::CompileMode mode);
@@ -471,7 +450,6 @@ class GlobalHelperThreadState {
471450
bool submitTask(GCParallelTask* task,
472451
const AutoLockHelperThreadState& locked);
473452
void runTaskLocked(HelperThreadTask* task, AutoLockHelperThreadState& lock);
474-
void runTaskFromExternalThread(AutoLockHelperThreadState& lock);
475453

476454
using Selector = HelperThreadTask* (
477455
GlobalHelperThreadState::*)(const AutoLockHelperThreadState&);

0 commit comments

Comments
 (0)