mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Change Value::to_object(Heap& -> Interpreter&)
Passing a Heap& to it only to then call interpreter() on that is weird. Let's just give it the Interpreter& directly, like some of the other to_something() functions.
This commit is contained in:
parent
b8b7f84547
commit
1a1394f7a2
Notes:
sideshowbarker
2024-07-19 06:32:25 +09:00
Author: https://github.com/linusg
Commit: 1a1394f7a2
Pull-request: https://github.com/SerenityOS/serenity/pull/2270
Issue: https://github.com/SerenityOS/serenity/issues/2267
26 changed files with 56 additions and 57 deletions
|
@ -71,7 +71,7 @@ Value StringConstructor::construct(Interpreter& interpreter)
|
|||
|
||||
Value StringConstructor::raw(Interpreter& interpreter)
|
||||
{
|
||||
auto* template_object = interpreter.argument(0).to_object(interpreter.heap());
|
||||
auto* template_object = interpreter.argument(0).to_object(interpreter);
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
|
||||
|
@ -83,7 +83,7 @@ Value StringConstructor::raw(Interpreter& interpreter)
|
|||
if (!raw.is_array())
|
||||
return js_string(interpreter, "");
|
||||
|
||||
auto& raw_array_elements = static_cast<Array*>(raw.to_object(interpreter.heap()))->elements();
|
||||
auto& raw_array_elements = static_cast<Array*>(raw.to_object(interpreter))->elements();
|
||||
StringBuilder builder;
|
||||
|
||||
for (size_t i = 0; i < raw_array_elements.size(); ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue