LibWeb: Embrace Interpreter::{argument_count(), argument(index)}

This commit is contained in:
Linus Groh 2020-05-21 00:48:12 +01:00 committed by Andreas Kling
commit 2d503b20da
Notes: sideshowbarker 2024-07-19 06:17:23 +09:00
5 changed files with 42 additions and 55 deletions

View file

@ -74,7 +74,7 @@ JS::Value HTMLCanvasElementWrapper::get_context(JS::Interpreter& interpreter)
auto* impl = impl_from(interpreter);
if (!impl)
return {};
auto context_type = interpreter.call_frame().arguments[0].to_string(interpreter);
auto context_type = interpreter.argument(0).to_string(interpreter);
if (interpreter.exception())
return {};
if (context_type != "2d")