Bug 1339944 - Prohibit context switches while handling OOM during type inference operations, r=jandem.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 21 Feb 2017 04:38:48 -0700
changeset 373085 3ebbc022b8f6832469e72a25f02b48d7553a4710
parent 373084 72f6eace33a1897d9d3d00189894e6e85c7b97ae
child 373086 2df453569f577fa1c5c6d60e9a00d255ce386e0e
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1339944
milestone54.0a1
Bug 1339944 - Prohibit context switches while handling OOM during type inference operations, r=jandem.
js/src/vm/TypeInference.cpp
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -4594,16 +4594,17 @@ AutoClearTypeInferenceStateOnOOM::AutoCl
 
 AutoClearTypeInferenceStateOnOOM::~AutoClearTypeInferenceStateOnOOM()
 {
     zone->types.setSweepingTypes(false);
 
     if (oom) {
         JSRuntime* rt = zone->runtimeFromActiveCooperatingThread();
         js::CancelOffThreadIonCompile(rt);
+        JSRuntime::AutoProhibitActiveContextChange apacc(rt);
         zone->setPreservingCode(false);
         zone->discardJitCode(rt->defaultFreeOp(), /* discardBaselineCode = */ false);
         zone->types.clearAllNewScriptsOnOOM();
     }
 }
 
 #ifdef DEBUG
 void