Bug 993965 - Fix busted OOM handling in some places where OOM is not practically possible, for the benefit of fuzzers. r=h4writer.

This commit is contained in:
Jason Orendorff 2014-05-22 08:18:00 -05:00
parent 1744dbb58b
commit 0de904ca09

View File

@ -949,8 +949,11 @@ js::StartOffThreadCompression(ExclusiveContext *cx, SourceCompressionTask *task)
AutoLockWorkerThreadState lock;
if (!WorkerThreadState().compressionWorklist().append(task))
if (!WorkerThreadState().compressionWorklist().append(task)) {
if (JSContext *maybecx = cx->maybeJSContext())
js_ReportOutOfMemory(maybecx);
return false;
}
WorkerThreadState().notifyOne(GlobalWorkerThreadState::PRODUCER);
return true;