Bug 1534958: Fix build when BinAST is disabled; r=arai
authorBenjamin Bouvier <benj@benj.me>
Wed, 13 Mar 2019 11:53:20 +0000
changeset 524693 2f9ff29f8920c42346add76531506f0f24496632
parent 524692 a74bd72021706765c0b158bcf0dc05145b9c6b6d
child 524694 916f90879f389f7b64b460506acce8f2f1f981bf
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [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();