mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: Convert reference deletion to ThrowCompletionOr
This commit is contained in:
parent
330ac1e5ad
commit
d73b258874
Notes:
sideshowbarker
2024-07-18 01:33:45 +09:00
Author: https://github.com/IdanHo
Commit: d73b258874
Pull-request: https://github.com/SerenityOS/serenity/pull/10765
Reviewed-by: https://github.com/linusg ✅
4 changed files with 10 additions and 14 deletions
|
@ -73,7 +73,7 @@ TESTJS_GLOBAL_FUNCTION(mark_as_garbage, markAsGarbage)
|
|||
return vm.throw_completion<JS::TypeError>(global_object, JS::ErrorType::NotAnObject, String::formatted("Variable with name {}", variable_name.string()));
|
||||
|
||||
vm.heap().uproot_cell(&value.as_object());
|
||||
reference.delete_(global_object);
|
||||
TRY(reference.delete_(global_object));
|
||||
|
||||
return JS::js_undefined();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue