2023-07-01 04:07:26 +00:00
|
|
|
/*
|
2023-07-15 10:33:22 +00:00
|
|
|
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
|
2023-07-01 04:07:26 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
class SharedArrayBufferConstructor final : public NativeFunction {
|
|
|
|
JS_OBJECT(SharedArrayBufferConstructor, NativeFunction);
|
2024-11-14 15:01:23 +00:00
|
|
|
GC_DECLARE_ALLOCATOR(SharedArrayBufferConstructor);
|
2023-07-01 04:07:26 +00:00
|
|
|
|
|
|
|
public:
|
2023-08-07 06:41:28 +00:00
|
|
|
virtual void initialize(Realm&) override;
|
2023-07-01 04:07:26 +00:00
|
|
|
virtual ~SharedArrayBufferConstructor() override = default;
|
|
|
|
|
|
|
|
virtual ThrowCompletionOr<Value> call() override;
|
2024-11-14 15:01:23 +00:00
|
|
|
virtual ThrowCompletionOr<GC::Ref<Object>> construct(FunctionObject& new_target) override;
|
2023-07-01 04:07:26 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
explicit SharedArrayBufferConstructor(Realm&);
|
|
|
|
|
|
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
|
|
|
|
JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|