LibWeb: Change return type of encapsulate for AlgorithmMethods

The standard ask to turn EncapsulatedBits into an ECMAScript Object
which means it must initially live in the host stack.
This commit is contained in:
Tete17
2025-11-28 21:54:03 +01:00
committed by Shannon Booth
parent 63c99f3703
commit ec67f0ae8d
Notes: github-actions[bot] 2025-12-30 13:18:36 +00:00
3 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ struct EncapsulatedBits {
Optional<ByteBuffer> shared_key;
Optional<ByteBuffer> ciphertext;
JS::ThrowCompletionOr<GC::Ref<JS::Object>> to_object(JS::Realm&);
JS::ThrowCompletionOr<GC::Ref<JS::Object>> to_object(JS::Realm&) const;
};
struct HashAlgorithmIdentifier : public AlgorithmIdentifier {
@@ -377,7 +377,7 @@ public:
return WebIDL::NotSupportedError::create(m_realm, "unwwrapKey is not supported"_utf16);
}
virtual WebIDL::ExceptionOr<GC::Ref<EncapsulatedBits>> encapsulate(AlgorithmParams const&, GC::Ref<CryptoKey>)
virtual WebIDL::ExceptionOr<EncapsulatedBits> encapsulate(AlgorithmParams const&, GC::Ref<CryptoKey>)
{
return WebIDL::NotSupportedError::create(m_realm, "encapsulate is not supported"_utf16);
}