mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibJS: Implement and use the MakeMethod AO
Two direct uses of the set_home_object() setter remain, we should fix those up and remove it eventually.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 22:01:25 +09:00
@@ -294,6 +294,15 @@ void ECMAScriptFunctionObject::visit_edges(Visitor& visitor)
|
||||
}
|
||||
}
|
||||
|
||||
// 10.2.7 MakeMethod ( F, homeObject ), https://tc39.es/ecma262/#sec-makemethod
|
||||
void ECMAScriptFunctionObject::make_method(Object& home_object)
|
||||
{
|
||||
// 1. Set F.[[HomeObject]] to homeObject.
|
||||
m_home_object = &home_object;
|
||||
|
||||
// 2. Return NormalCompletion(undefined).
|
||||
}
|
||||
|
||||
// 10.2.11 FunctionDeclarationInstantiation ( func, argumentsList ), https://tc39.es/ecma262/#sec-functiondeclarationinstantiation
|
||||
ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantiation(Interpreter* interpreter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user