mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
LibJS: Remove unneeded FIXMEs for suspending an execution context
From what I understand, the suspension steps are not required now, or in the future for our implementation, or any other. The intent is already implemented in the spec pushing on another execution context to the stack and leaving the running execution context as-is. The resume steps are a slightly different story as there is some subtle behavior which the spec is trying to convey where some custom logic may need to be done when one execution context changes from one to another. It may be worth implementing those steps at a later point in time so that this behavior is a bit easier to follow in those cases. To make the situation more confusing - from what I can gather from the spec, not all cases that the spec mentions resume actually means anything normative. Resume is only _actually_ needed in a limited set of locations. For now, let's just remove the unneeded FIXMEs that indicate that there is something to be done for the suspension steps, as there is not, and leave the resume steps as is.
This commit is contained in:
parent
44bb2b7e32
commit
d48a0aaa55
Notes:
github-actions[bot]
2025-01-02 10:31:16 +00:00
Author: https://github.com/shannonbooth
Commit: d48a0aaa55
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3091
9 changed files with 15 additions and 30 deletions
|
@ -216,8 +216,7 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record, GC::Ptr<Environ
|
|||
// NOTE: This isn't in the spec, but we require it.
|
||||
script_context->is_strict_mode = script_record.parse_node().is_strict_mode();
|
||||
|
||||
// FIXME: 9. Suspend the currently running execution context.
|
||||
|
||||
// 9. Suspend the currently running execution context.
|
||||
// 10. Push scriptContext onto the execution context stack; scriptContext is now the running execution context.
|
||||
TRY(vm.push_execution_context(*script_context, {}));
|
||||
|
||||
|
@ -260,7 +259,7 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record, GC::Ptr<Environ
|
|||
result = normal_completion(js_undefined());
|
||||
}
|
||||
|
||||
// FIXME: 15. Suspend scriptContext and remove it from the execution context stack.
|
||||
// 15. Suspend scriptContext and remove it from the execution context stack.
|
||||
vm.pop_execution_context();
|
||||
|
||||
// 16. Assert: The execution context stack is not empty.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue