LibWeb: Return GC::Ref for some Stream promise returning functions

These will never return null.
This commit is contained in:
Shannon Booth 2024-11-17 04:39:34 +13:00 committed by Andreas Kling
commit 8d93cac983
Notes: github-actions[bot] 2024-11-16 17:34:55 +00:00
4 changed files with 10 additions and 10 deletions

View file

@ -58,7 +58,7 @@ bool WritableStream::locked() const
}
// https://streams.spec.whatwg.org/#ws-close
GC::Ptr<WebIDL::Promise> WritableStream::close()
GC::Ref<WebIDL::Promise> WritableStream::close()
{
auto& realm = this->realm();
@ -79,7 +79,7 @@ GC::Ptr<WebIDL::Promise> WritableStream::close()
}
// https://streams.spec.whatwg.org/#ws-abort
GC::Ptr<WebIDL::Promise> WritableStream::abort(JS::Value reason)
GC::Ref<WebIDL::Promise> WritableStream::abort(JS::Value reason)
{
auto& realm = this->realm();