(cherry picked from commit 6be083187f49e444de1bb116bb5930b20125190b)
This commit is contained in:
Brian Smith 2023-04-08 03:27:08 -05:00 committed by roytam1
commit a8ab41b4c6
21 changed files with 238 additions and 46 deletions

View file

@ -4240,7 +4240,8 @@ 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);
usedNames, nullptr, nullptr,
frontend::ParseGoal::Script);
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