LibWeb+Meta: Add wrapper for the BufferSource/ArrayBufferView IDL types

These wrappers will make it much easier to do various operations on the
different ArrayBuffer-related classes in LibWeb compared to the current
solution, which is to just accept a Handle<Object> everywhere (and use
"any" in the *.idl files).

Co-Authored-By: Matthew Olsson <mattco@serenityos.org>
This commit is contained in:
Shannon Booth 2023-11-23 20:07:25 +13:00 committed by Andreas Kling
commit 04c094343f
Notes: sideshowbarker 2024-07-17 04:34:25 +09:00
27 changed files with 286 additions and 71 deletions

View file

@ -21,7 +21,7 @@ class Module : public Bindings::PlatformObject {
JS_DECLARE_ALLOCATOR(Module);
public:
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Module>> construct_impl(JS::Realm&, JS::Handle<JS::Object>& bytes);
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Module>> construct_impl(JS::Realm&, JS::Handle<WebIDL::BufferSource>& bytes);
size_t index() const { return m_index; }
Wasm::Module const& module() const;