Last active
June 16, 2020 12:55
-
-
Save allstarschh/3ab25e70063f6fd68fc75ea028c90219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp | |
index 7e676fb17e19..2e4a1843f534 100644 | |
--- a/js/src/vm/HelperThreads.cpp | |
+++ b/js/src/vm/HelperThreads.cpp | |
@@ -1683,17 +1683,20 @@ void GlobalHelperThreadState::startHandlingCompressionTasks( | |
} | |
void GlobalHelperThreadState::scheduleCompressionTasks( | |
const AutoLockHelperThreadState& lock, ScheduleCompressionTask schedule) { | |
auto& pending = compressionPendingList(lock); | |
auto& worklist = compressionWorklist(lock); | |
for (size_t i = 0; i < pending.length(); i++) { | |
- if (pending[i]->shouldStart() || schedule != ScheduleCompressionTask::GC) { | |
+ if (pending[i]->shouldCancel()) { | |
+ remove(pending, &i); | |
+ } else if (pending[i]->shouldStart() || | |
+ schedule != ScheduleCompressionTask::GC) { | |
// OOMing during appending results in the task not being scheduled | |
// and deleted. | |
Unused << worklist.append(std::move(pending[i])); | |
remove(pending, &i); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment