diff options
author | 2022-06-22 23:21:48 -0700 | |
---|---|---|
committer | 2022-06-22 23:21:48 -0700 | |
commit | 729d445b6885f69dd2c6355f38707bd42851c791 (patch) | |
tree | f87a7c408929ea3f57bbb7ace380cf869da83c0e /src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp | |
parent | 25f820c6bf1d8ec6d444ef579cc036b8c0607b75 (diff) | |
download | bun-jarred/rename.tar.gz bun-jarred/rename.tar.zst bun-jarred/rename.zip |
change the directory structurejarred/rename
Diffstat (limited to 'src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp')
-rw-r--r-- | src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp | 183 |
1 files changed, 0 insertions, 183 deletions
diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp b/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp deleted file mode 100644 index 0b3dec469..000000000 --- a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - This file is part of the WebKit open source project. - This file has been generated by generate-bindings.pl. DO NOT MODIFY! - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "config.h" -#include "JSReadableStreamBYOBRequest.h" - -#include "ExtendedDOMClientIsoSubspaces.h" -#include "ExtendedDOMIsoSubspaces.h" -#include "JSDOMAttribute.h" -#include "JSDOMBinding.h" -#include "JSDOMBuiltinConstructor.h" -#include "JSDOMExceptionHandling.h" -#include "JSDOMGlobalObjectInlines.h" -#include "JSDOMOperation.h" -#include "JSDOMWrapperCache.h" -#include "ReadableStreamBYOBRequestBuiltins.h" -#include "WebCoreJSClientData.h" -#include <JavaScriptCore/FunctionPrototype.h> -#include <JavaScriptCore/JSCInlines.h> -#include <JavaScriptCore/JSDestructibleObjectHeapCellType.h> -#include <JavaScriptCore/SlotVisitorMacros.h> -#include <JavaScriptCore/SubspaceInlines.h> -#include <wtf/GetPtr.h> -#include <wtf/PointerPreparations.h> - - -namespace WebCore { -using namespace JSC; - -// Functions - - -// Attributes - -static JSC_DECLARE_CUSTOM_GETTER(jsReadableStreamBYOBRequestConstructor); - -class JSReadableStreamBYOBRequestPrototype final : public JSC::JSNonFinalObject { -public: - using Base = JSC::JSNonFinalObject; - static JSReadableStreamBYOBRequestPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) - { - JSReadableStreamBYOBRequestPrototype* ptr = new (NotNull, JSC::allocateCell<JSReadableStreamBYOBRequestPrototype>(vm)) JSReadableStreamBYOBRequestPrototype(vm, globalObject, structure); - ptr->finishCreation(vm); - return ptr; - } - - DECLARE_INFO; - template<typename CellType, JSC::SubspaceAccess> - static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) - { - STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSReadableStreamBYOBRequestPrototype, Base); - return &vm.plainObjectSpace(); - } - static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) - { - return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); - } - -private: - JSReadableStreamBYOBRequestPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) - : JSC::JSNonFinalObject(vm, structure) - { - } - - void finishCreation(JSC::VM&); -}; -STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSReadableStreamBYOBRequestPrototype, JSReadableStreamBYOBRequestPrototype::Base); - -using JSReadableStreamBYOBRequestDOMConstructor = JSDOMBuiltinConstructor<JSReadableStreamBYOBRequest>; - -template<> const ClassInfo JSReadableStreamBYOBRequestDOMConstructor::s_info = { "ReadableStreamBYOBRequest"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableStreamBYOBRequestDOMConstructor) }; - -template<> JSValue JSReadableStreamBYOBRequestDOMConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) -{ - UNUSED_PARAM(vm); - return globalObject.functionPrototype(); -} - -template<> void JSReadableStreamBYOBRequestDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) -{ - putDirect(vm, vm.propertyNames->length, jsNumber(2), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); - JSString* nameString = jsNontrivialString(vm, "ReadableStreamBYOBRequest"_s); - m_originalName.set(vm, this, nameString); - putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); - putDirect(vm, vm.propertyNames->prototype, JSReadableStreamBYOBRequest::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete); -} - -template<> FunctionExecutable* JSReadableStreamBYOBRequestDOMConstructor::initializeExecutable(VM& vm) -{ - return readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeGenerator(vm); -} - -/* Hash table for prototype */ - -static const HashTableValue JSReadableStreamBYOBRequestPrototypeTableValues[] = -{ - { "constructor"_s, static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsReadableStreamBYOBRequestConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, - { "view"_s, static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::Accessor | JSC::PropertyAttribute::Builtin), NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(readableStreamBYOBRequestViewCodeGenerator), (intptr_t) (0) } }, - { "respond"_s, static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::Builtin), NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(readableStreamBYOBRequestRespondCodeGenerator), (intptr_t) (0) } }, - { "respondWithNewView"_s, static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::Builtin), NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(readableStreamBYOBRequestRespondWithNewViewCodeGenerator), (intptr_t) (0) } }, -}; - -const ClassInfo JSReadableStreamBYOBRequestPrototype::s_info = { "ReadableStreamBYOBRequest"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableStreamBYOBRequestPrototype) }; - -void JSReadableStreamBYOBRequestPrototype::finishCreation(VM& vm) -{ - Base::finishCreation(vm); - reifyStaticProperties(vm, JSReadableStreamBYOBRequest::info(), JSReadableStreamBYOBRequestPrototypeTableValues, *this); - JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); -} - -const ClassInfo JSReadableStreamBYOBRequest::s_info = { "ReadableStreamBYOBRequest"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableStreamBYOBRequest) }; - -JSReadableStreamBYOBRequest::JSReadableStreamBYOBRequest(Structure* structure, JSDOMGlobalObject& globalObject) - : JSDOMObject(structure, globalObject) { } - -void JSReadableStreamBYOBRequest::finishCreation(VM& vm) -{ - Base::finishCreation(vm); - ASSERT(inherits(info())); - -} - -JSObject* JSReadableStreamBYOBRequest::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) -{ - return JSReadableStreamBYOBRequestPrototype::create(vm, &globalObject, JSReadableStreamBYOBRequestPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); -} - -JSObject* JSReadableStreamBYOBRequest::prototype(VM& vm, JSDOMGlobalObject& globalObject) -{ - return getDOMPrototype<JSReadableStreamBYOBRequest>(vm, globalObject); -} - -JSValue JSReadableStreamBYOBRequest::getConstructor(VM& vm, const JSGlobalObject* globalObject) -{ - return getDOMConstructor<JSReadableStreamBYOBRequestDOMConstructor, DOMConstructorID::ReadableStreamBYOBRequest>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); -} - -void JSReadableStreamBYOBRequest::destroy(JSC::JSCell* cell) -{ - JSReadableStreamBYOBRequest* thisObject = static_cast<JSReadableStreamBYOBRequest*>(cell); - thisObject->JSReadableStreamBYOBRequest::~JSReadableStreamBYOBRequest(); -} - -JSC_DEFINE_CUSTOM_GETTER(jsReadableStreamBYOBRequestConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) -{ - VM& vm = JSC::getVM(lexicalGlobalObject); - auto throwScope = DECLARE_THROW_SCOPE(vm); - auto* prototype = jsDynamicCast<JSReadableStreamBYOBRequestPrototype*>(JSValue::decode(thisValue)); - if (UNLIKELY(!prototype)) - return throwVMTypeError(lexicalGlobalObject, throwScope); - return JSValue::encode(JSReadableStreamBYOBRequest::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); -} - -JSC::GCClient::IsoSubspace* JSReadableStreamBYOBRequest::subspaceForImpl(JSC::VM& vm) -{ - return WebCore::subspaceForImpl<JSReadableStreamBYOBRequest, UseCustomHeapCellType::No>(vm, - [] (auto& spaces) { return spaces.m_clientSubspaceForReadableStreamBYOBRequest.get(); }, - [] (auto& spaces, auto&& space) { spaces.m_clientSubspaceForReadableStreamBYOBRequest = WTFMove(space); }, - [] (auto& spaces) { return spaces.m_subspaceForReadableStreamBYOBRequest.get(); }, - [] (auto& spaces, auto&& space) { spaces.m_subspaceForReadableStreamBYOBRequest = WTFMove(space); } - ); -} - - -} |