Issue #2236 - Fix import.meta module error in lambdas by moving parseGoal() into SharedContext. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1604792 Also remove ParseGoal being passed through Parser introduced in #1691 Part 2.

This commit is contained in:
Brian Smith 2023-05-08 18:28:18 -05:00 committed by roytam1
commit 1c70f64e7c
10 changed files with 63 additions and 45 deletions

View file

@ -4265,8 +4265,7 @@ JS_BufferIsCompilableUnit(JSContext* cx, HandleObject obj, const char* utf8, siz
frontend::Parser<frontend::FullParseHandler> parser(cx, cx->tempLifoAlloc(),
options, chars, length,
/* foldConstants = */ true,
usedNames, nullptr, nullptr,
frontend::ParseGoal::Script);
usedNames, nullptr, nullptr);
JS::WarningReporter older = JS::SetWarningReporter(cx, nullptr);
if (!parser.checkOptions() || !parser.parse()) {
// We ran into an error. If it was because we ran out of source, we