Bug 1473213 (Part 2) - add a comment about an invariant required by the JIT r=sfink
authorPaul Bone <pbone@mozilla.com>
Mon, 16 Jul 2018 11:36:49 +1000
changeset 486483 8217b33680fa66e2553d27c9076a6bf429df3431
parent 486482 9022f602d14632498cab4a73c947797365b2f459
child 486484 5f35c86a0d22072c5287f46f338bcbd36ea5d76c
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1473213
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1473213 (Part 2) - add a comment about an invariant required by the JIT r=sfink
js/src/gc/Nursery.cpp
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -240,16 +240,18 @@ js::Nursery::disable()
 {
     MOZ_ASSERT(isEmpty());
     if (!isEnabled())
         return;
 
     freeChunksFrom(0);
     maxChunkCount_ = 0;
 
+    // We must reset currentEnd_ so that there is no space for anything in the
+    // nursery.  JIT'd code uses this even if the nursery is disabled.
     currentEnd_ = 0;
     currentStringEnd_ = 0;
     runtime()->gc.storeBuffer().disable();
 }
 
 void
 js::Nursery::enableStrings()
 {