mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibJS: Pass prototype to Error constructors
This commit is contained in:
parent
0df4d2823a
commit
205ac0090d
Notes:
sideshowbarker
2024-07-19 07:31:33 +09:00
Author: https://github.com/awesomekling
Commit: 205ac0090d
5 changed files with 30 additions and 15 deletions
|
@ -70,7 +70,7 @@ Value FunctionConstructor::construct(Interpreter& interpreter)
|
|||
auto function_expression = parser.parse_function_node<FunctionExpression>();
|
||||
if (parser.has_errors()) {
|
||||
// FIXME: The parser should expose parsing error strings rather than just fprintf()'ing them
|
||||
return interpreter.heap().allocate<Error>("SyntaxError", "");
|
||||
return Error::create(interpreter.global_object(), "SyntaxError", "");
|
||||
}
|
||||
return function_expression->execute(interpreter);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue