Bug 1547179 - Remove an assertion that's no longer valid because rt->profilingScripts no longer implies IsLCovEnabled. r=nbp
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 03 May 2019 12:28:57 +0000
changeset 531463 dcdecf563747b29b8bd7270937d190e967b3ea50
parent 531462 2509defe2779464cd2df4c211decf32e5be37909
child 531475 c6d806b496845985516cc04342c04988aa1817dd
child 531480 eb990c2653e061801885f4546e8da756a8464873
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1547179
milestone68.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 1547179 - Remove an assertion that's no longer valid because rt->profilingScripts no longer implies IsLCovEnabled. r=nbp Differential Revision: https://phabricator.services.mozilla.com/D28952
js/src/vm/Realm.cpp
--- a/js/src/vm/Realm.cpp
+++ b/js/src/vm/Realm.cpp
@@ -333,22 +333,20 @@ void Realm::traceRoots(JSTracer* trc,
   // then the following comment holds.
   //
   // The scriptCountsMap maps JSScript weak-pointers to ScriptCounts
   // structures. It uses a HashMap instead of a WeakMap, so that we can keep
   // the data alive for the JSScript::finalize call. Thus, we do not trace the
   // keys of the HashMap to avoid adding a strong reference to the JSScript
   // pointers.
   //
-  // If the code coverage is either enabled with the --dump-bytecode command
-  // line option, or with the PCCount JSFriend API functions, then we mark the
-  // keys of the map to hold the JSScript alive.
+  // If the --dump-bytecode command line option or the PCCount JSFriend API
+  // is used, then we mark the keys of the map to hold the JSScript alive.
   if (scriptCountsMap && trc->runtime()->profilingScripts &&
       !JS::RuntimeHeapIsMinorCollecting()) {
-    MOZ_ASSERT_IF(!trc->runtime()->isBeingDestroyed(), collectCoverage());
     for (ScriptCountsMap::Range r = scriptCountsMap->all(); !r.empty();
          r.popFront()) {
       JSScript* script = const_cast<JSScript*>(r.front().key());
       MOZ_ASSERT(script->hasScriptCounts());
       TraceRoot(trc, &script, "profilingScripts");
       MOZ_ASSERT(script == r.front().key(), "const_cast is only a work-around");
     }
   }