mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-14 02:46:22 +02:00
The use of extract_parameter_arguments_and_body() here is to make things a little less awkward. If we were to exactly follow spec there would be an awkward handling of the case that no arguments were provided and we needed to provide an empty string. To do this, we would need to either: - Provide an Optional<Value> for bodyString to CreateDynamicFunction - Create a new empty PrimitiveString wrapped in a JS Value. Either case is somewhat awkward. Instead, just refactor this logic outside of CreateDynamicFunction and make the caller do it. Otherwise, this commit prepares for the new definition of HostEnsureCanCompileStrings. (cherry picked from commit 6da0ac3aa71c991e18e96d721b1843c417cdab78)
2.0 KiB
2.0 KiB