mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
|
@ -639,7 +639,7 @@ ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller,
|
|||
}
|
||||
|
||||
// 19. If runningContext is not already suspended, suspend runningContext.
|
||||
// FIXME: We don't have this concept yet.
|
||||
// NOTE: Done by the push on step 27.
|
||||
|
||||
// 20. Let evalContext be a new ECMAScript code execution context.
|
||||
auto eval_context = ExecutionContext::create();
|
||||
|
@ -670,8 +670,7 @@ ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller,
|
|||
|
||||
// NOTE: We use a ScopeGuard to automatically pop the execution context when any of the `TRY`s below return a throw completion.
|
||||
ScopeGuard pop_guard = [&] {
|
||||
// FIXME: 31. Suspend evalContext and remove it from the execution context stack.
|
||||
|
||||
// 31. Suspend evalContext and remove it from the execution context stack.
|
||||
// 32. Resume the context that is now on the top of the execution context stack as the running execution context.
|
||||
vm.pop_execution_context();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue