aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/JSSink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/JSSink.cpp')
-rw-r--r--src/bun.js/bindings/JSSink.cpp167
1 files changed, 101 insertions, 66 deletions
diff --git a/src/bun.js/bindings/JSSink.cpp b/src/bun.js/bindings/JSSink.cpp
index 22423127a..1e5e71662 100644
--- a/src/bun.js/bindings/JSSink.cpp
+++ b/src/bun.js/bindings/JSSink.cpp
@@ -1,6 +1,6 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
-// Generated by /Users/jarred/Code/bun/src/bun.js/generate-jssink.js at 2022-06-26T11:24:51.211Z
+// Generated by /Users/jarred/Code/bun/src/bun.js/generate-jssink.js at 2022-06-29T05:28:50.141Z
// To regenerate this file, run:
//
// bun src/bun.js/generate-jssink.js
@@ -194,24 +194,6 @@ JSC_DEFINE_HOST_FUNCTION(ArrayBufferSink__doClose, (JSC::JSGlobalObject * lexica
return JSC::JSValue::encode(JSC::jsUndefined());
}
-static const HashTableValue JSArrayBufferSinkPrototypeTableValues[]
- = {
- { "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__doClose), (intptr_t)(0) } },
- { "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__drain), (intptr_t)(1) } },
- { "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__end), (intptr_t)(0) } },
- { "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__start), (intptr_t)(1) } },
- { "write"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__write), (intptr_t)(1) } },
- };
-
-static const HashTableValue JSReadableArrayBufferSinkControllerPrototypeTableValues[]
- = {
- { "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableArrayBufferSinkController__close), (intptr_t)(0) } },
- { "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__drain), (intptr_t)(1) } },
- { "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableArrayBufferSinkController__end), (intptr_t)(0) } },
- { "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__start), (intptr_t)(1) } },
- { "write"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__write), (intptr_t)(1) } },
- };
-
JSC_DEFINE_CUSTOM_GETTER(functionHTTPResponseSink__getter, (JSC::JSGlobalObject * lexicalGlobalObject, JSC::EncodedJSValue thisValue, JSC::PropertyName))
{
auto& vm = lexicalGlobalObject->vm();
@@ -288,24 +270,6 @@ JSC_DEFINE_HOST_FUNCTION(HTTPResponseSink__doClose, (JSC::JSGlobalObject * lexic
return JSC::JSValue::encode(JSC::jsUndefined());
}
-static const HashTableValue JSHTTPResponseSinkPrototypeTableValues[]
- = {
- { "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__doClose), (intptr_t)(0) } },
- { "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__drain), (intptr_t)(1) } },
- { "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__end), (intptr_t)(0) } },
- { "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__start), (intptr_t)(1) } },
- { "write"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__write), (intptr_t)(1) } },
- };
-
-static const HashTableValue JSReadableHTTPResponseSinkControllerPrototypeTableValues[]
- = {
- { "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPResponseSinkController__close), (intptr_t)(0) } },
- { "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__drain), (intptr_t)(1) } },
- { "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPResponseSinkController__end), (intptr_t)(0) } },
- { "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__start), (intptr_t)(1) } },
- { "write"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__write), (intptr_t)(1) } },
- };
-
JSC_DEFINE_CUSTOM_GETTER(functionHTTPSResponseSink__getter, (JSC::JSGlobalObject * lexicalGlobalObject, JSC::EncodedJSValue thisValue, JSC::PropertyName))
{
auto& vm = lexicalGlobalObject->vm();
@@ -382,23 +346,67 @@ JSC_DEFINE_HOST_FUNCTION(HTTPSResponseSink__doClose, (JSC::JSGlobalObject * lexi
return JSC::JSValue::encode(JSC::jsUndefined());
}
-static const HashTableValue JSHTTPSResponseSinkPrototypeTableValues[]
- = {
- { "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__doClose), (intptr_t)(0) } },
- { "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__drain), (intptr_t)(1) } },
- { "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__end), (intptr_t)(0) } },
- { "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__start), (intptr_t)(1) } },
- { "write"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__write), (intptr_t)(1) } },
- };
-
-static const HashTableValue JSReadableHTTPSResponseSinkControllerPrototypeTableValues[]
- = {
- { "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPSResponseSinkController__close), (intptr_t)(0) } },
- { "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__drain), (intptr_t)(1) } },
- { "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPSResponseSinkController__end), (intptr_t)(0) } },
- { "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__start), (intptr_t)(1) } },
- { "write"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__write), (intptr_t)(1) } },
- };
+#include "JSSinkLookupTable.h"
+
+/* Source for JSArrayBufferSinkPrototypeTableValues.lut.h
+@begin JSArrayBufferSinkPrototypeTable
+ close ArrayBufferSink__doClose ReadOnly|DontDelete|Function 0
+ drain ArrayBufferSink__drain ReadOnly|DontDelete|Function 1
+ end ArrayBufferSink__end ReadOnly|DontDelete|Function 0
+ start ArrayBufferSink__start ReadOnly|DontDelete|Function 1
+ write ArrayBufferSink__write ReadOnly|DontDelete|Function 1
+@end
+*/
+
+/* Source for JSReadableArrayBufferSinkControllerPrototypeTableValues.lut.h
+@begin JSReadableArrayBufferSinkControllerPrototypeTable
+ close JSReadableArrayBufferSinkController__close ReadOnly|DontDelete|Function 0
+ drain ArrayBufferSink__drain ReadOnly|DontDelete|Function 1
+ end JSReadableArrayBufferSinkController__end ReadOnly|DontDelete|Function 0
+ start ArrayBufferSink__start ReadOnly|DontDelete|Function 1
+ write ArrayBufferSink__write ReadOnly|DontDelete|Function 1
+@end
+*/
+
+/* Source for JSHTTPResponseSinkPrototypeTableValues.lut.h
+@begin JSHTTPResponseSinkPrototypeTable
+ close HTTPResponseSink__doClose ReadOnly|DontDelete|Function 0
+ drain HTTPResponseSink__drain ReadOnly|DontDelete|Function 1
+ end HTTPResponseSink__end ReadOnly|DontDelete|Function 0
+ start HTTPResponseSink__start ReadOnly|DontDelete|Function 1
+ write HTTPResponseSink__write ReadOnly|DontDelete|Function 1
+@end
+*/
+
+/* Source for JSReadableHTTPResponseSinkControllerPrototypeTableValues.lut.h
+@begin JSReadableHTTPResponseSinkControllerPrototypeTable
+ close JSReadableHTTPResponseSinkController__close ReadOnly|DontDelete|Function 0
+ drain HTTPResponseSink__drain ReadOnly|DontDelete|Function 1
+ end JSReadableHTTPResponseSinkController__end ReadOnly|DontDelete|Function 0
+ start HTTPResponseSink__start ReadOnly|DontDelete|Function 1
+ write HTTPResponseSink__write ReadOnly|DontDelete|Function 1
+@end
+*/
+
+/* Source for JSHTTPSResponseSinkPrototypeTableValues.lut.h
+@begin JSHTTPSResponseSinkPrototypeTable
+ close HTTPSResponseSink__doClose ReadOnly|DontDelete|Function 0
+ drain HTTPSResponseSink__drain ReadOnly|DontDelete|Function 1
+ end HTTPSResponseSink__end ReadOnly|DontDelete|Function 0
+ start HTTPSResponseSink__start ReadOnly|DontDelete|Function 1
+ write HTTPSResponseSink__write ReadOnly|DontDelete|Function 1
+@end
+*/
+
+/* Source for JSReadableHTTPSResponseSinkControllerPrototypeTableValues.lut.h
+@begin JSReadableHTTPSResponseSinkControllerPrototypeTable
+ close JSReadableHTTPSResponseSinkController__close ReadOnly|DontDelete|Function 0
+ drain HTTPSResponseSink__drain ReadOnly|DontDelete|Function 1
+ end JSReadableHTTPSResponseSinkController__end ReadOnly|DontDelete|Function 0
+ start HTTPSResponseSink__start ReadOnly|DontDelete|Function 1
+ write HTTPSResponseSink__write ReadOnly|DontDelete|Function 1
+@end
+*/
#pragma mark - ArrayBufferSink
@@ -466,11 +474,11 @@ private:
};
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSReadableArrayBufferSinkControllerPrototype, JSReadableArrayBufferSinkControllerPrototype::Base);
-const ClassInfo JSArrayBufferSinkPrototype::s_info = { "ArrayBufferSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSArrayBufferSinkPrototype) };
+const ClassInfo JSArrayBufferSinkPrototype::s_info = { "ArrayBufferSink"_s, &Base::s_info, &JSArrayBufferSinkPrototypeTable, nullptr, CREATE_METHOD_TABLE(JSArrayBufferSinkPrototype) };
const ClassInfo JSArrayBufferSink::s_info = { "ArrayBufferSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSArrayBufferSink) };
const ClassInfo JSArrayBufferSinkConstructor::s_info = { "ArrayBufferSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSArrayBufferSinkConstructor) };
-const ClassInfo JSReadableArrayBufferSinkControllerPrototype::s_info = { "ReadableArrayBufferSinkController"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableArrayBufferSinkControllerPrototype) };
+const ClassInfo JSReadableArrayBufferSinkControllerPrototype::s_info = { "ReadableArrayBufferSinkController"_s, &Base::s_info, &JSReadableArrayBufferSinkControllerPrototypeTable, nullptr, CREATE_METHOD_TABLE(JSReadableArrayBufferSinkControllerPrototype) };
const ClassInfo JSReadableArrayBufferSinkController::s_info = { "ReadableArrayBufferSinkController"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableArrayBufferSinkController) };
JSArrayBufferSink::~JSArrayBufferSink()
@@ -487,6 +495,16 @@ JSReadableArrayBufferSinkController::~JSReadableArrayBufferSinkController()
}
}
+JSObject* JSArrayBufferSink::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
+{
+ return JSArrayBufferSinkPrototype::create(vm, &globalObject, JSArrayBufferSinkPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
+}
+
+JSObject* JSReadableArrayBufferSinkController::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
+{
+ return JSReadableArrayBufferSinkControllerPrototype::create(vm, &globalObject, JSReadableArrayBufferSinkControllerPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
+}
+
JSArrayBufferSinkConstructor* JSArrayBufferSinkConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSObject* prototype)
{
JSArrayBufferSinkConstructor* ptr = new (NotNull, JSC::allocateCell<JSArrayBufferSinkConstructor>(vm)) JSArrayBufferSinkConstructor(vm, structure, ArrayBufferSink__construct);
@@ -672,11 +690,11 @@ private:
};
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSReadableHTTPResponseSinkControllerPrototype, JSReadableHTTPResponseSinkControllerPrototype::Base);
-const ClassInfo JSHTTPResponseSinkPrototype::s_info = { "HTTPResponseSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTTPResponseSinkPrototype) };
+const ClassInfo JSHTTPResponseSinkPrototype::s_info = { "HTTPResponseSink"_s, &Base::s_info, &JSHTTPResponseSinkPrototypeTable, nullptr, CREATE_METHOD_TABLE(JSHTTPResponseSinkPrototype) };
const ClassInfo JSHTTPResponseSink::s_info = { "HTTPResponseSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTTPResponseSink) };
const ClassInfo JSHTTPResponseSinkConstructor::s_info = { "HTTPResponseSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTTPResponseSinkConstructor) };
-const ClassInfo JSReadableHTTPResponseSinkControllerPrototype::s_info = { "ReadableHTTPResponseSinkController"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableHTTPResponseSinkControllerPrototype) };
+const ClassInfo JSReadableHTTPResponseSinkControllerPrototype::s_info = { "ReadableHTTPResponseSinkController"_s, &Base::s_info, &JSReadableHTTPResponseSinkControllerPrototypeTable, nullptr, CREATE_METHOD_TABLE(JSReadableHTTPResponseSinkControllerPrototype) };
const ClassInfo JSReadableHTTPResponseSinkController::s_info = { "ReadableHTTPResponseSinkController"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableHTTPResponseSinkController) };
JSHTTPResponseSink::~JSHTTPResponseSink()
@@ -693,6 +711,16 @@ JSReadableHTTPResponseSinkController::~JSReadableHTTPResponseSinkController()
}
}
+JSObject* JSHTTPResponseSink::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
+{
+ return JSHTTPResponseSinkPrototype::create(vm, &globalObject, JSHTTPResponseSinkPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
+}
+
+JSObject* JSReadableHTTPResponseSinkController::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
+{
+ return JSReadableHTTPResponseSinkControllerPrototype::create(vm, &globalObject, JSReadableHTTPResponseSinkControllerPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
+}
+
JSHTTPResponseSinkConstructor* JSHTTPResponseSinkConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSObject* prototype)
{
JSHTTPResponseSinkConstructor* ptr = new (NotNull, JSC::allocateCell<JSHTTPResponseSinkConstructor>(vm)) JSHTTPResponseSinkConstructor(vm, structure, HTTPResponseSink__construct);
@@ -878,11 +906,11 @@ private:
};
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSReadableHTTPSResponseSinkControllerPrototype, JSReadableHTTPSResponseSinkControllerPrototype::Base);
-const ClassInfo JSHTTPSResponseSinkPrototype::s_info = { "HTTPSResponseSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTTPSResponseSinkPrototype) };
+const ClassInfo JSHTTPSResponseSinkPrototype::s_info = { "HTTPSResponseSink"_s, &Base::s_info, &JSHTTPSResponseSinkPrototypeTable, nullptr, CREATE_METHOD_TABLE(JSHTTPSResponseSinkPrototype) };
const ClassInfo JSHTTPSResponseSink::s_info = { "HTTPSResponseSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTTPSResponseSink) };
const ClassInfo JSHTTPSResponseSinkConstructor::s_info = { "HTTPSResponseSink"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTTPSResponseSinkConstructor) };
-const ClassInfo JSReadableHTTPSResponseSinkControllerPrototype::s_info = { "ReadableHTTPSResponseSinkController"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableHTTPSResponseSinkControllerPrototype) };
+const ClassInfo JSReadableHTTPSResponseSinkControllerPrototype::s_info = { "ReadableHTTPSResponseSinkController"_s, &Base::s_info, &JSReadableHTTPSResponseSinkControllerPrototypeTable, nullptr, CREATE_METHOD_TABLE(JSReadableHTTPSResponseSinkControllerPrototype) };
const ClassInfo JSReadableHTTPSResponseSinkController::s_info = { "ReadableHTTPSResponseSinkController"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSReadableHTTPSResponseSinkController) };
JSHTTPSResponseSink::~JSHTTPSResponseSink()
@@ -899,6 +927,16 @@ JSReadableHTTPSResponseSinkController::~JSReadableHTTPSResponseSinkController()
}
}
+JSObject* JSHTTPSResponseSink::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
+{
+ return JSHTTPSResponseSinkPrototype::create(vm, &globalObject, JSHTTPSResponseSinkPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
+}
+
+JSObject* JSReadableHTTPSResponseSinkController::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
+{
+ return JSReadableHTTPSResponseSinkControllerPrototype::create(vm, &globalObject, JSReadableHTTPSResponseSinkControllerPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
+}
+
JSHTTPSResponseSinkConstructor* JSHTTPSResponseSinkConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSObject* prototype)
{
JSHTTPSResponseSinkConstructor* ptr = new (NotNull, JSC::allocateCell<JSHTTPSResponseSinkConstructor>(vm)) JSHTTPSResponseSinkConstructor(vm, structure, HTTPSResponseSink__construct);
@@ -1096,8 +1134,7 @@ extern "C" JSC__JSValue ArrayBufferSink__assignToStream(JSC__JSGlobalObject* arg
JSC::JSObject* readableStream = JSC::JSValue::decode(stream).getObject();
auto scope = DECLARE_CATCH_SCOPE(vm);
- JSC::JSValue prototype = globalObject->JSReadableArrayBufferSinkControllerPrototype();
- JSC::Structure* structure = WebCore::JSReadableArrayBufferSinkController::createStructure(vm, globalObject, prototype);
+ JSC::Structure* structure = WebCore::getDOMStructure<WebCore::JSReadableArrayBufferSinkController>(vm, *globalObject);
WebCore::JSReadableArrayBufferSinkController* controller = WebCore::JSReadableArrayBufferSinkController::create(vm, globalObject, structure, sinkPtr);
*controllerValue = reinterpret_cast<void*>(JSC::JSValue::encode(controller));
JSC::JSObject* function = globalObject->getDirect(vm, clientData->builtinNames().assignToStreamPrivateName()).getObject();
@@ -1195,8 +1232,7 @@ extern "C" JSC__JSValue HTTPResponseSink__assignToStream(JSC__JSGlobalObject* ar
JSC::JSObject* readableStream = JSC::JSValue::decode(stream).getObject();
auto scope = DECLARE_CATCH_SCOPE(vm);
- JSC::JSValue prototype = globalObject->JSReadableHTTPResponseSinkControllerPrototype();
- JSC::Structure* structure = WebCore::JSReadableHTTPResponseSinkController::createStructure(vm, globalObject, prototype);
+ JSC::Structure* structure = WebCore::getDOMStructure<WebCore::JSReadableHTTPResponseSinkController>(vm, *globalObject);
WebCore::JSReadableHTTPResponseSinkController* controller = WebCore::JSReadableHTTPResponseSinkController::create(vm, globalObject, structure, sinkPtr);
*controllerValue = reinterpret_cast<void*>(JSC::JSValue::encode(controller));
JSC::JSObject* function = globalObject->getDirect(vm, clientData->builtinNames().assignToStreamPrivateName()).getObject();
@@ -1294,8 +1330,7 @@ extern "C" JSC__JSValue HTTPSResponseSink__assignToStream(JSC__JSGlobalObject* a
JSC::JSObject* readableStream = JSC::JSValue::decode(stream).getObject();
auto scope = DECLARE_CATCH_SCOPE(vm);
- JSC::JSValue prototype = globalObject->JSReadableHTTPSResponseSinkControllerPrototype();
- JSC::Structure* structure = WebCore::JSReadableHTTPSResponseSinkController::createStructure(vm, globalObject, prototype);
+ JSC::Structure* structure = WebCore::getDOMStructure<WebCore::JSReadableHTTPSResponseSinkController>(vm, *globalObject);
WebCore::JSReadableHTTPSResponseSinkController* controller = WebCore::JSReadableHTTPSResponseSinkController::create(vm, globalObject, structure, sinkPtr);
*controllerValue = reinterpret_cast<void*>(JSC::JSValue::encode(controller));
JSC::JSObject* function = globalObject->getDirect(vm, clientData->builtinNames().assignToStreamPrivateName()).getObject();