Verified Commit a36ab04b authored by Yoshi Cheng-Hao Huang's avatar Yoshi Cheng-Hao Huang Committed by ma1
Browse files

Bug 2073269 - Part 1: Respect the goal symbol when building CompileOptions for...

Bug 2073269 - Part 1: Respect the goal symbol when building CompileOptions for delazification scripts.  a=diannaS

See https://bugzilla.mozilla.org/show_bug.cgi?id=2073269#c3

Original Revision: https://phabricator.services.mozilla.com/D328086

Differential Revision: https://phabricator.services.mozilla.com/D328633
parent abd0241c
Loading
Loading
Loading
Loading
+2 −0
Changes for js/src/frontend/BytecodeCompiler.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1523,6 +1523,7 @@ static bool DelazifyCanonicalScriptedFunctionImpl(JSContext* cx,
      .setNoScriptRval(false)
      .setSelfHostingMode(false)
      .setEagerDelazificationStrategy(lazy->delazificationMode());
  options.allowHTMLComments = !lazy->hasModuleGoal();

  Rooted<CompilationInput> input(cx, CompilationInput(options));
  input.get().initFromLazy(cx, lazy, ss);
@@ -1630,6 +1631,7 @@ static const CompilationStencil* DelazifyCanonicalScriptedFunctionImpl(
      .setScriptSourceOffset(sourceStart)
      .setNoScriptRval(false)
      .setSelfHostingMode(false);
  options.allowHTMLComments = !extra.hasModuleGoal();

  // CompilationInput initialized with initFromStencil only reference
  // information from the CompilationStencil context and the ref-counted