mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibJS: Stop tracking whether execution context is strict mode or not
This was only used for basic testing, and forced us to plumb this flag flag in a bunch of places.
This commit is contained in:
parent
fb05063dde
commit
fdb85a330e
Notes:
github-actions[bot]
2025-10-29 20:22:21 +00:00
Author: https://github.com/awesomekling
Commit: fdb85a330e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6629
19 changed files with 4 additions and 320 deletions
|
|
@ -25,18 +25,15 @@ Result<GC::Ref<Script>, Vector<ParserError>> Script::parse(StringView source_tex
|
|||
if (parser.has_errors())
|
||||
return parser.errors();
|
||||
|
||||
bool strict_mode = script->is_strict_mode();
|
||||
|
||||
// 3. Return Script Record { [[Realm]]: realm, [[ECMAScriptCode]]: script, [[HostDefined]]: hostDefined }.
|
||||
return realm.heap().allocate<Script>(realm, filename, move(script), host_defined, strict_mode);
|
||||
return realm.heap().allocate<Script>(realm, filename, move(script), host_defined);
|
||||
}
|
||||
|
||||
Script::Script(Realm& realm, StringView filename, NonnullRefPtr<Program> parse_node, HostDefined* host_defined, bool strict_mode)
|
||||
Script::Script(Realm& realm, StringView filename, NonnullRefPtr<Program> parse_node, HostDefined* host_defined)
|
||||
: m_realm(realm)
|
||||
, m_parse_node(move(parse_node))
|
||||
, m_filename(filename)
|
||||
, m_host_defined(host_defined)
|
||||
, m_strict_mode(strict_mode)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue