diff --git a/scripts/build/deps/webkit.ts b/scripts/build/deps/webkit.ts index 995262a97fcc..4243e2e658a3 100644 --- a/scripts/build/deps/webkit.ts +++ b/scripts/build/deps/webkit.ts @@ -7,7 +7,7 @@ // -lto variants built with ThinLTO (per-module summaries for cross-language // importing), and the Windows ICU data table filtered + per-item zstd // compressed (lazily decompressed via bun_icu_decompress.cpp). -export const WEBKIT_VERSION = "5851d4722e461bae1eb5537b091f4103e192a94a"; +export const WEBKIT_VERSION = "autobuild-preview-pr-251-92b221c1"; /** * WebKit (JavaScriptCore) — the JS engine. diff --git a/src/jsc/bindings/JSFFIFunction.cpp b/src/jsc/bindings/JSFFIFunction.cpp index d03353812655..cbe3a0f2d373 100644 --- a/src/jsc/bindings/JSFFIFunction.cpp +++ b/src/jsc/bindings/JSFFIFunction.cpp @@ -150,18 +150,12 @@ void JSFFIFunction::visitChildrenImpl(JSCell* cell, Visitor& visitor) DEFINE_VISIT_CHILDREN(JSFFIFunction); -void JSFFIFunction::finishCreation(VM& vm, NativeExecutable* executable, unsigned length, const String& name) -{ - Base::finishCreation(vm, executable, length, name); - ASSERT(inherits(info())); -} - JSFFIFunction* JSFFIFunction::create(VM& vm, Zig::GlobalObject* globalObject, unsigned length, const String& name, FFIFunction FFIFunction, Intrinsic intrinsic, NativeFunction nativeConstructor) { - NativeExecutable* executable = vm.getHostFunction(FFIFunction, ImplementationVisibility::Public, intrinsic, FFIFunction, nullptr, name); + NativeExecutable* executable = vm.getHostFunction(FFIFunction, ImplementationVisibility::Public, intrinsic, FFIFunction, nullptr, length, name); Structure* structure = globalObject->FFIFunctionStructure(); JSFFIFunction* function = new (NotNull, allocateCell(vm)) JSFFIFunction(vm, executable, globalObject, structure, reinterpret_cast(WTF::move(FFIFunction))); - function->finishCreation(vm, executable, length, name); + function->finishCreation(vm); return function; } @@ -178,13 +172,13 @@ JSC_DEFINE_HOST_FUNCTION(JSFFIFunction::trampoline, (JSC::JSGlobalObject * globa JSFFIFunction* JSFFIFunction::createForFFI(VM& vm, Zig::GlobalObject* globalObject, unsigned length, const String& name, CFFIFunction FFIFunction) { #if OS(WINDOWS) - NativeExecutable* executable = vm.getHostFunction(trampoline, ImplementationVisibility::Public, NoIntrinsic, trampoline, nullptr, name); + NativeExecutable* executable = vm.getHostFunction(trampoline, ImplementationVisibility::Public, NoIntrinsic, trampoline, nullptr, length, name); #else - NativeExecutable* executable = vm.getHostFunction(FFIFunction, ImplementationVisibility::Public, NoIntrinsic, FFIFunction, nullptr, name); + NativeExecutable* executable = vm.getHostFunction(FFIFunction, ImplementationVisibility::Public, NoIntrinsic, FFIFunction, nullptr, length, name); #endif Structure* structure = globalObject->FFIFunctionStructure(); JSFFIFunction* function = new (NotNull, allocateCell(vm)) JSFFIFunction(vm, executable, globalObject, structure, reinterpret_cast(WTF::move(FFIFunction))); - function->finishCreation(vm, executable, length, name); + function->finishCreation(vm); return function; } diff --git a/src/jsc/bindings/JSFFIFunction.h b/src/jsc/bindings/JSFFIFunction.h index 6eccae7b6174..fde3e215adbf 100644 --- a/src/jsc/bindings/JSFFIFunction.h +++ b/src/jsc/bindings/JSFFIFunction.h @@ -91,7 +91,6 @@ class JSFFIFunction final : public JSC::JSFunction { private: JSFFIFunction(VM&, NativeExecutable*, JSGlobalObject*, Structure*, CFFIFunction&&); - void finishCreation(VM&, NativeExecutable*, unsigned length, const String& name); DECLARE_VISIT_CHILDREN; CFFIFunction m_function; diff --git a/src/jsc/bindings/JSWrappingFunction.cpp b/src/jsc/bindings/JSWrappingFunction.cpp index 2b35c618e96e..57f53d111b23 100644 --- a/src/jsc/bindings/JSWrappingFunction.cpp +++ b/src/jsc/bindings/JSWrappingFunction.cpp @@ -31,23 +31,17 @@ JS_EXPORT_PRIVATE JSWrappingFunction* JSWrappingFunction::create( auto name = Identifier::fromString(vm, nameStr); // Pass callHostFunctionAsConstructor so `new` on the wrapper throws a // TypeError instead of jumping to a null native constructor. - NativeExecutable* executable = vm.getHostFunction(functionPointer, ImplementationVisibility::Public, callHostFunctionAsConstructor, nameStr); + NativeExecutable* executable = vm.getHostFunction(functionPointer, ImplementationVisibility::Public, callHostFunctionAsConstructor, 0, nameStr); // Structure* structure = globalObject->FFIFunctionStructure(); Structure* structure = JSWrappingFunction::createStructure(vm, globalObject, globalObject->objectPrototype()); JSWrappingFunction* function = new (NotNull, allocateCell(vm)) JSWrappingFunction(vm, executable, globalObject, structure, wrappedFn); ASSERT(function->structure()->globalObject()); - function->finishCreation(vm, executable, 0, nameStr); + function->finishCreation(vm); return function; } -void JSWrappingFunction::finishCreation(VM& vm, NativeExecutable* executable, unsigned length, const String& name) -{ - Base::finishCreation(vm, executable, length, name); - ASSERT(inherits(info())); -} - template void JSWrappingFunction::visitChildrenImpl(JSCell* cell, Visitor& visitor) { diff --git a/src/jsc/bindings/JSWrappingFunction.h b/src/jsc/bindings/JSWrappingFunction.h index 5b2aec591ba3..18aa6d3aaeda 100644 --- a/src/jsc/bindings/JSWrappingFunction.h +++ b/src/jsc/bindings/JSWrappingFunction.h @@ -65,8 +65,6 @@ class JSWrappingFunction final : public JSC::JSFunction { { } - void finishCreation(JSC::VM&, JSC::NativeExecutable*, unsigned length, const String& name); - DECLARE_VISIT_CHILDREN; JSC::WriteBarrier m_wrappedFn; diff --git a/src/jsc/bindings/NapiClass.cpp b/src/jsc/bindings/NapiClass.cpp index 37381160e7ef..19a0616fbf68 100644 --- a/src/jsc/bindings/NapiClass.cpp +++ b/src/jsc/bindings/NapiClass.cpp @@ -92,19 +92,19 @@ NapiClass* NapiClass::create(VM& vm, napi_env env, WTF::String name, NapiClass_ConstructorFunction, ImplementationVisibility::Public, // for constructor call - NapiClass_ConstructorFunction, name); + NapiClass_ConstructorFunction, 0, name); Structure* structure = env->globalObject()->NapiClassStructure(); NapiClass* napiClass = new (NotNull, allocateCell(vm)) NapiClass(vm, executable, env, structure, data); - napiClass->finishCreation(vm, executable, name, constructor, data, property_count, properties); + napiClass->finishCreation(vm, name, constructor, data, property_count, properties); return napiClass; } -void NapiClass::finishCreation(VM& vm, NativeExecutable* executable, const String& name, napi_callback constructor, +void NapiClass::finishCreation(VM& vm, const String& name, napi_callback constructor, void* data, size_t property_count, const napi_property_descriptor* properties) { - Base::finishCreation(vm, executable, 0, name); + Base::finishCreation(vm); ASSERT(inherits(info())); this->m_constructor = constructor; auto globalObject = static_cast(this->globalObject()); diff --git a/src/jsc/bindings/napi.h b/src/jsc/bindings/napi.h index aa305eae35c3..aa4a29f5cb1a 100644 --- a/src/jsc/bindings/napi.h +++ b/src/jsc/bindings/napi.h @@ -828,7 +828,7 @@ class NapiClass final : public JSC::JSFunction { { } - void finishCreation(VM&, NativeExecutable*, const String& name, napi_callback constructor, + void finishCreation(VM&, const String& name, napi_callback constructor, void* data, size_t property_count, const napi_property_descriptor* properties); diff --git a/src/jsc/bindings/sqlite/JSSQLStatement.cpp b/src/jsc/bindings/sqlite/JSSQLStatement.cpp index c68c7c2e8ba1..1e90204a307d 100644 --- a/src/jsc/bindings/sqlite/JSSQLStatement.cpp +++ b/src/jsc/bindings/sqlite/JSSQLStatement.cpp @@ -1685,7 +1685,7 @@ JSC_DEFINE_HOST_FUNCTION(jsSQLStatementPrepareStatementFunction, (JSC::JSGlobalO JSSQLStatementConstructor* JSSQLStatementConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) { - NativeExecutable* executable = vm.getHostFunction(jsSQLStatementPrepareStatementFunction, ImplementationVisibility::Private, callHostFunctionAsConstructor, String("SQLStatement"_s)); + NativeExecutable* executable = vm.getHostFunction(jsSQLStatementPrepareStatementFunction, ImplementationVisibility::Private, callHostFunctionAsConstructor, 0, String("SQLStatement"_s)); JSSQLStatementConstructor* ptr = new (NotNull, JSC::allocateCell(vm)) JSSQLStatementConstructor(vm, executable, globalObject, structure); ptr->finishCreation(vm);