mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibJS: Update comments for WrappedFunction [[Call]] implementation
This commit is contained in:
parent
b5536db915
commit
01c2ecf355
Notes:
github-actions[bot]
2024-11-03 12:50:13 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/01c2ecf3558 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2116 Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 5 deletions
|
@ -68,16 +68,13 @@ ThrowCompletionOr<Value> WrappedFunction::internal_call(Value this_argument, Rea
|
|||
// 3. Assert: calleeContext is now the running execution context.
|
||||
VERIFY(&vm.running_execution_context() == callee_context);
|
||||
|
||||
// 4. Let result be OrdinaryWrappedFunctionCall(F, thisArgument, argumentsList).
|
||||
// 4. Let result be Completion(OrdinaryWrappedFunctionCall(F, thisArgument, argumentsList)).
|
||||
auto result = ordinary_wrapped_function_call(*this, this_argument, arguments_list);
|
||||
|
||||
// 5. Remove calleeContext from the execution context stack and restore callerContext as the running execution context.
|
||||
vm.pop_execution_context();
|
||||
|
||||
// NOTE: I think the spec isn't fully correct here, see https://github.com/tc39/proposal-shadowrealm/issues/371.
|
||||
// 6. If result.[[Type]] is return, return result.[[Value]].
|
||||
// 7. ReturnIfAbrupt(result).
|
||||
// 8. Return undefined.
|
||||
// 6. Return ? result.
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue