mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 06:41:50 +00:00
a
This commit is contained in:
27
src/bun.js/bindings/JSBuildMessageConstructor.cpp
Normal file
27
src/bun.js/bindings/JSBuildMessageConstructor.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "JSBuildMessageConstructor.h"
|
||||
#include "JSBuildMessage.h"
|
||||
#include <JavaScriptCore/JSCJSValueInlines.h>
|
||||
|
||||
using namespace JSC;
|
||||
|
||||
namespace Bun {
|
||||
|
||||
const JSC::ClassInfo JSBuildMessageConstructor::s_info = { "BuildMessage"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBuildMessageConstructor) };
|
||||
|
||||
JSC_DEFINE_HOST_FUNCTION(callBuildMessage, (JSC::JSGlobalObject * lexicalGlobalObject, JSC::CallFrame* callFrame))
|
||||
{
|
||||
VM& vm = lexicalGlobalObject->vm();
|
||||
ThrowScope scope = DECLARE_THROW_SCOPE(vm);
|
||||
throwConstructorCannotBeCalledAsFunctionTypeError(lexicalGlobalObject, scope, "BuildMessage"_s);
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC_DEFINE_HOST_FUNCTION(constructBuildMessage, (JSC::JSGlobalObject * lexicalGlobalObject, JSC::CallFrame* callFrame))
|
||||
{
|
||||
JSC::VM& vm = lexicalGlobalObject->vm();
|
||||
ThrowScope scope = DECLARE_THROW_SCOPE(vm);
|
||||
throwTypeError(lexicalGlobalObject, scope, "BuildMessage cannot be constructed directly"_s);
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace Bun
|
||||
Reference in New Issue
Block a user