Bug 1534958: Fix build when BinAST is disabled; r=arai
authorBenjamin Bouvier <benj@benj.me>
Wed, 13 Mar 2019 11:53:20 +0000
changeset 521695 2f9ff29f8920
parent 521694 a74bd7202170
child 521696 916f90879f38
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1534958
milestone67.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 1534958: Fix build when BinAST is disabled; r=arai Differential Revision: https://phabricator.services.mozilla.com/D23301
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -133,19 +133,25 @@ bool GeneralParser<ParseHandler, Unit>::
     return false;
   }
   return true;
 }
 
 ParserSharedBase::ParserSharedBase(JSContext* cx, LifoAlloc& alloc,
                                    UsedNameTracker& usedNames,
                                    ScriptSourceObject* sourceObject, Kind kind)
-    : JS::AutoGCRooter(cx, kind == Kind::Parser
-                               ? JS::AutoGCRooter::Tag::Parser
-                               : JS::AutoGCRooter::Tag::BinASTParser),
+    : JS::AutoGCRooter(
+          cx,
+#ifdef JS_BUILD_BINAST
+          kind == Kind::Parser ? JS::AutoGCRooter::Tag::Parser
+                               : JS::AutoGCRooter::Tag::BinASTParser
+#else
+          JS::AutoGCRooter::Tag::Parser
+#endif
+          ),
       cx_(cx),
       alloc_(alloc),
       traceListHead_(nullptr),
       pc_(nullptr),
       usedNames_(usedNames),
       sourceObject_(cx, sourceObject),
       keepAtoms_(cx) {
   cx->frontendCollectionPool().addActiveCompilation();