Bug 1498320 - Adjust some access controls now that BytecodeCompiler is used only as base class, not on its own. r=tcampbell
authorJeff Walden <jwalden@mit.edu>
Thu, 01 Nov 2018 17:34:55 -0700
changeset 446505 630a1645006614713cbe8698542c6d278601cb6f
parent 446504 9dc874d79c1f1f60869a806ddeb4f78915504360
child 446506 532b05c76fa0ba9e56c278430a6e763feefa23a4
push id35042
push useraiakab@mozilla.com
push dateThu, 15 Nov 2018 09:54:38 +0000
treeherdermozilla-central@dca9c72df68b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1498320
milestone65.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 1498320 - Adjust some access controls now that BytecodeCompiler is used only as base class, not on its own. r=tcampbell
js/src/frontend/BytecodeCompiler.cpp
--- a/js/src/frontend/BytecodeCompiler.cpp
+++ b/js/src/frontend/BytecodeCompiler.cpp
@@ -56,32 +56,33 @@ class MOZ_STACK_CLASS BytecodeCompiler
     Maybe<UsedNameTracker> usedNames;
     Maybe<Parser<SyntaxParseHandler, char16_t>> syntaxParser;
     Maybe<Parser<FullParseHandler, char16_t>> parser;
 
     Directives directives;
 
     RootedScript script;
 
-  public:
+  protected:
     // Construct an object passing mandatory arguments.
     BytecodeCompiler(JSContext* cx,
                      const ReadOnlyCompileOptions& options,
                      SourceBufferHolder& sourceBuffer);
 
+  public:
     ScriptSourceObject* sourceObjectPtr() const {
         return sourceObject.get();
     }
 
+  protected:
     // Call this before calling compile{Global,Eval}Script.
     MOZ_MUST_USE bool prepareScriptParse() {
         return createSourceAndParser(ParseGoal::Script) && createCompleteScript();
     }
 
-  protected:
     void assertSourceAndParserCreated() const {
         MOZ_ASSERT(sourceObject != nullptr);
         MOZ_ASSERT(scriptSource != nullptr);
         MOZ_ASSERT(usedNames.isSome());
         MOZ_ASSERT(parser.isSome());
     }
 
     JSScript* compileScript(HandleObject environment, SharedContext* sc);