From fa1ba7fadf721807da4f0e5dab6f4656a56b0fbd Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Fri, 24 Feb 2023 12:18:43 +0100 Subject: [PATCH] LibWeb: Mark JS::Promise* return value for digest() with JS::NNGCPtr --- Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp | 2 +- Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp b/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp index 5bb9104f1ce..64c9a3834f4 100644 --- a/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp +++ b/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp @@ -35,7 +35,7 @@ JS::ThrowCompletionOr SubtleCrypto::initialize(JS::Realm& realm) } // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-digest -JS::Promise* SubtleCrypto::digest(String const& algorithm, JS::Handle const& data) +JS::NonnullGCPtr SubtleCrypto::digest(String const& algorithm, JS::Handle const& data) { auto& realm = this->realm(); diff --git a/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h b/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h index 0113cf16b12..ad4c700d751 100644 --- a/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h +++ b/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h @@ -19,7 +19,7 @@ public: virtual ~SubtleCrypto() override; - JS::Promise* digest(String const& algorithm, JS::Handle const& data); + JS::NonnullGCPtr digest(String const& algorithm, JS::Handle const& data); private: explicit SubtleCrypto(JS::Realm&);