mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibJS: Add missing MUST in DisposableStack.prototype.use
Although the spec has a TRY here I believe this is a spec issue together with the missing TRY just above this change.
This commit is contained in:
parent
42606c87e3
commit
bb483c8308
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ JS_DEFINE_NATIVE_FUNCTION(DisposableStackPrototype::use)
|
|||
}
|
||||
// d. Else,
|
||||
// i. Perform ? AddDisposableResource(disposableStack, value, sync-dispose, method).
|
||||
add_disposable_resource(vm, disposable_stack->disposable_resource_stack(), value, Environment::InitializeBindingHint::SyncDispose, method);
|
||||
// FIXME: Fairly sure this can't fail, see https://github.com/tc39/proposal-explicit-resource-management/pull/142
|
||||
MUST(add_disposable_resource(vm, disposable_stack->disposable_resource_stack(), value, Environment::InitializeBindingHint::SyncDispose, method));
|
||||
}
|
||||
|
||||
// 5. Return value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue