Browse Source

LibWeb: Mark JS::Promise* return value for digest() with JS::NNGCPtr

Kenneth Myhra 2 years ago
parent
commit
fa1ba7fadf

+ 1 - 1
Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp

@@ -35,7 +35,7 @@ JS::ThrowCompletionOr<void> SubtleCrypto::initialize(JS::Realm& realm)
 }
 }
 
 
 // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-digest
 // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-digest
-JS::Promise* SubtleCrypto::digest(String const& algorithm, JS::Handle<JS::Object> const& data)
+JS::NonnullGCPtr<JS::Promise> SubtleCrypto::digest(String const& algorithm, JS::Handle<JS::Object> const& data)
 {
 {
     auto& realm = this->realm();
     auto& realm = this->realm();
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h

@@ -19,7 +19,7 @@ public:
 
 
     virtual ~SubtleCrypto() override;
     virtual ~SubtleCrypto() override;
 
 
-    JS::Promise* digest(String const& algorithm, JS::Handle<JS::Object> const& data);
+    JS::NonnullGCPtr<JS::Promise> digest(String const& algorithm, JS::Handle<JS::Object> const& data);
 
 
 private:
 private:
     explicit SubtleCrypto(JS::Realm&);
     explicit SubtleCrypto(JS::Realm&);