2020-12-02 20:49:31 +00:00
|
|
|
/*
|
2021-04-22 22:51:19 +02:00
|
|
|
* Copyright (c) 2020, Linus Groh <linusg@serenityos.org>
|
2020-12-02 20:49:31 +00:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-12-02 20:49:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
class ArrayBufferConstructor final : public NativeFunction {
|
|
|
|
JS_OBJECT(ArrayBufferConstructor, NativeFunction);
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ArrayBufferConstructor(GlobalObject&);
|
|
|
|
virtual void initialize(GlobalObject&) override;
|
|
|
|
virtual ~ArrayBufferConstructor() override;
|
|
|
|
|
2021-10-20 21:16:30 +01:00
|
|
|
virtual ThrowCompletionOr<Value> call() override;
|
|
|
|
virtual ThrowCompletionOr<Object*> construct(FunctionObject& new_target) override;
|
2020-12-02 20:49:31 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
|
2021-10-19 20:18:01 +03:00
|
|
|
JS_DECLARE_OLD_NATIVE_FUNCTION(is_view);
|
2021-06-07 19:31:32 +03:00
|
|
|
|
2021-10-19 20:18:01 +03:00
|
|
|
JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
|
2020-12-02 20:49:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|