Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/build/deps/webkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 5 additions & 11 deletions src/jsc/bindings/JSFFIFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<JSFFIFunction>(vm)) JSFFIFunction(vm, executable, globalObject, structure, reinterpret_cast<CFFIFunction>(WTF::move(FFIFunction)));
function->finishCreation(vm, executable, length, name);
function->finishCreation(vm);
return function;
}

Expand All @@ -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<JSFFIFunction>(vm)) JSFFIFunction(vm, executable, globalObject, structure, reinterpret_cast<CFFIFunction>(WTF::move(FFIFunction)));
function->finishCreation(vm, executable, length, name);
function->finishCreation(vm);
return function;
}

Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/JSFFIFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 2 additions & 8 deletions src/jsc/bindings/JSWrappingFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<JSWrappingFunction>(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<typename Visitor>
void JSWrappingFunction::visitChildrenImpl(JSCell* cell, Visitor& visitor)
{
Expand Down
2 changes: 0 additions & 2 deletions src/jsc/bindings/JSWrappingFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<JSC::JSObject> m_wrappedFn;
Expand Down
8 changes: 4 additions & 4 deletions src/jsc/bindings/NapiClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@ NapiClass* NapiClass::create(VM& vm, napi_env env, WTF::String name,
NapiClass_ConstructorFunction<false>,
ImplementationVisibility::Public,
// for constructor call
NapiClass_ConstructorFunction<true>, name);
NapiClass_ConstructorFunction<true>, 0, name);
Structure* structure = env->globalObject()->NapiClassStructure();
NapiClass* napiClass = new (NotNull, allocateCell<NapiClass>(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<Zig::GlobalObject*>(this->globalObject());
Expand Down
2 changes: 1 addition & 1 deletion src/jsc/bindings/napi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/jsc/bindings/sqlite/JSSQLStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<JSSQLStatementConstructor>(vm)) JSSQLStatementConstructor(vm, executable, globalObject, structure);
ptr->finishCreation(vm);

Expand Down
Loading