Bug 1470732 - Reprotect memory of pending Ion compilations in case of moving GCs. r=jonco a=lizzard
authorNicolas B. Pierron <nicolas.b.pierron@gmail.com>
Mon, 25 Jun 2018 16:10:55 +0000
changeset 477818 75dd2f223571bdb52189d66b2120cd38b6846002
parent 477817 5d3dcb2922cb7b7c16077626c5a50b7f50b1cdbf
child 477819 94d94a0e3473e6398e36a54f59676f05440a4158
push id9436
push userarchaeopteryx@coole-files.de
push dateThu, 05 Jul 2018 15:15:35 +0000
treeherdermozilla-beta@5a6eba66a378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco, lizzard
bugs1470732
milestone62.0
Bug 1470732 - Reprotect memory of pending Ion compilations in case of moving GCs. r=jonco a=lizzard
js/src/vm/HelperThreads.cpp
--- a/js/src/vm/HelperThreads.cpp
+++ b/js/src/vm/HelperThreads.cpp
@@ -2278,18 +2278,21 @@ js::StartOffThreadPromiseHelperTask(Prom
     HelperThreadState().notifyOne(GlobalHelperThreadState::PRODUCER, lock);
     return true;
 }
 
 void
 GlobalHelperThreadState::trace(JSTracer* trc)
 {
     AutoLockHelperThreadState lock;
-    for (auto builder : ionWorklist(lock))
+    for (auto builder : ionWorklist(lock)) {
+        builder->alloc().lifoAlloc()->setReadWrite();
         builder->trace(trc);
+        builder->alloc().lifoAlloc()->setReadOnly();
+    }
     for (auto builder : ionFinishedList(lock))
         builder->trace(trc);
 
     if (HelperThreadState().threads) {
         for (auto& helper : *HelperThreadState().threads) {
             if (auto builder = helper.ionBuilder())
                 builder->trace(trc);
         }