mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1559275 - Remove unused CompileOptions::allowSyntaxParser. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D35070 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
d2cb6059f3
commit
8a260ca538
@ -193,7 +193,6 @@ class JS_PUBLIC_API ReadOnlyCompileOptions : public TransitiveCompileOptions {
|
||||
|
||||
bool nonSyntacticScope = false;
|
||||
bool noScriptRval = false;
|
||||
bool allowSyntaxParser = true;
|
||||
|
||||
private:
|
||||
friend class CompileOptions;
|
||||
@ -405,11 +404,6 @@ class MOZ_STACK_CLASS JS_PUBLIC_API CompileOptions final
|
||||
return *this;
|
||||
}
|
||||
|
||||
CompileOptions& setAllowSyntaxParser(bool clp) {
|
||||
allowSyntaxParser = clp;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CompileOptions& setSourceIsLazy(bool l) {
|
||||
sourceIsLazy = l;
|
||||
return *this;
|
||||
|
@ -5174,7 +5174,6 @@ static bool Parse(JSContext* cx, unsigned argc, Value* vp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool allowSyntaxParser = true;
|
||||
frontend::ParseGoal goal = frontend::ParseGoal::Script;
|
||||
|
||||
if (args.length() >= 2) {
|
||||
@ -5186,22 +5185,6 @@ static bool Parse(JSContext* cx, unsigned argc, Value* vp) {
|
||||
}
|
||||
RootedObject objOptions(cx, &args[1].toObject());
|
||||
|
||||
RootedValue optionAllowSyntaxParser(cx);
|
||||
if (!JS_GetProperty(cx, objOptions, "allowSyntaxParser",
|
||||
&optionAllowSyntaxParser)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (optionAllowSyntaxParser.isBoolean()) {
|
||||
allowSyntaxParser = optionAllowSyntaxParser.toBoolean();
|
||||
} else if (!optionAllowSyntaxParser.isUndefined()) {
|
||||
const char* typeName = InformalValueTypeName(optionAllowSyntaxParser);
|
||||
JS_ReportErrorASCII(
|
||||
cx, "option `allowSyntaxParser` should be a boolean, got %s",
|
||||
typeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
RootedValue optionModule(cx);
|
||||
if (!JS_GetProperty(cx, objOptions, "module", &optionModule)) {
|
||||
return false;
|
||||
@ -5233,9 +5216,7 @@ static bool Parse(JSContext* cx, unsigned argc, Value* vp) {
|
||||
const char16_t* chars = stableChars.twoByteRange().begin().get();
|
||||
|
||||
CompileOptions options(cx);
|
||||
options.setIntroductionType("js shell parse")
|
||||
.setFileAndLine("<string>", 1)
|
||||
.setAllowSyntaxParser(allowSyntaxParser);
|
||||
options.setIntroductionType("js shell parse").setFileAndLine("<string>", 1);
|
||||
if (goal == frontend::ParseGoal::Module) {
|
||||
// See frontend::CompileModule.
|
||||
options.maybeMakeStrictMode(true);
|
||||
|
Loading…
Reference in New Issue
Block a user