LibWeb: Expose crypto object to workers

This change moves the `crypto()` getter from `Window` to
`WorkerOrWindowGlobalScope`. This aligns our implementation with the
WebCrypto specification.
This commit is contained in:
Tim Ledbetter 2024-09-17 16:44:42 +01:00 committed by Andreas Kling
commit 89b6cd3fb1
Notes: github-actions[bot] 2024-09-18 08:09:56 +00:00
9 changed files with 33 additions and 19 deletions

View file

@ -78,6 +78,8 @@ public:
void report_error(JS::Value e);
[[nodiscard]] JS::NonnullGCPtr<Crypto::Crypto> crypto();
protected:
void initialize(JS::Realm&);
void visit_edges(JS::Cell::Visitor&);
@ -117,6 +119,8 @@ private:
mutable JS::GCPtr<JS::Object> m_supported_entry_types_array;
JS::GCPtr<Crypto::Crypto> m_crypto;
bool m_error_reporting_mode { false };
};