Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade WebKit #12873

Merged
merged 37 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
18aef7a
Upgrade WebKit
Jarred-Sumner Jul 27, 2024
294cbe3
Update root.h
Jarred-Sumner Jul 27, 2024
bcb780b
more
Jarred-Sumner Jul 28, 2024
e0e5f30
Update CMakeLists.txt
Jarred-Sumner Jul 28, 2024
7b80c70
Update CMakeLists.txt
Jarred-Sumner Jul 28, 2024
c45f6d9
Apply formatting changes
Jarred-Sumner Jul 28, 2024
846db6f
Update CMakeLists.txt
Jarred-Sumner Jul 28, 2024
fb67674
Apply formatting changes
Jarred-Sumner Jul 28, 2024
c49a79d
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Jul 29, 2024
5e675bd
More tweaks for MALLOC_HEAP_BREAKDOWN
Jarred-Sumner Jul 29, 2024
6a416ed
Add `BUN_FEATURE_FLAG_DISABLE_ASYNC_TRANSPILER` feature flag
Jarred-Sumner Jul 29, 2024
69e967c
Fixes #12910
Jarred-Sumner Jul 29, 2024
8d8cd0d
Add missing isObject check
Jarred-Sumner Jul 29, 2024
66d9ac3
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Aug 1, 2024
f84c86d
Update CMakeLists.txt
Jarred-Sumner Aug 1, 2024
1c1de31
set eval mode
dylan-conway Aug 1, 2024
7f37591
test
Jarred-Sumner Aug 1, 2024
de80c1a
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Aug 2, 2024
b2dc6a1
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Aug 2, 2024
d7e2e97
simdutf
dylan-conway Aug 2, 2024
541d961
remove formatting
dylan-conway Aug 2, 2024
d429326
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Aug 2, 2024
4f4c026
Update CMakeLists.txt
Jarred-Sumner Aug 2, 2024
17fcc60
bump webkit
dylan-conway Aug 2, 2024
1b9b5d2
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Aug 2, 2024
f336711
Bump
Jarred-Sumner Aug 2, 2024
b818f4a
Fix use-after-move
Jarred-Sumner Aug 2, 2024
3a0a30f
Update reference count
Jarred-Sumner Aug 2, 2024
0b1624e
Update CMakeLists.txt
Jarred-Sumner Aug 2, 2024
adb6aeb
Use a ref
Jarred-Sumner Aug 2, 2024
24cbc78
Flip the bool
Jarred-Sumner Aug 2, 2024
b1c76bc
Update JSCTaskScheduler.cpp
Jarred-Sumner Aug 2, 2024
6dc674b
Make clang-tidy happier
Jarred-Sumner Aug 2, 2024
7fcbf14
Merge branch 'main' into jarred/upgrade-webkit
Jarred-Sumner Aug 2, 2024
ffa3d38
Update JSCTaskScheduler.cpp
Jarred-Sumner Aug 2, 2024
3bc71ac
Update
Jarred-Sumner Aug 2, 2024
935f7fc
Update CMakeLists.txt
Jarred-Sumner Aug 2, 2024
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy(SET CMP0067 NEW)

set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
set(Bun_VERSION "1.1.22")
set(WEBKIT_TAG f9a0fda2d2b2fd001a00bfcf8e7917a56b382516)
set(WEBKIT_TAG a060f087c2232fb20d82c321d21e074e735d3261)

set(BUN_WORKDIR "${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "Configuring Bun ${Bun_VERSION} in ${BUN_WORKDIR}")
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,7 @@ jsc-build-mac-compile-debug:
-DCMAKE_BUILD_TYPE=Debug \
-DUSE_THIN_ARCHIVES=OFF \
-DENABLE_FTL_JIT=ON \
-DENABLE_MALLOC_HEAP_BREAKDOWN=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DUSE_BUN_JSC_ADDITIONS=ON \
-DENABLE_BUN_SKIP_FAILING_ASSERTIONS=ON \
Expand Down
2 changes: 1 addition & 1 deletion packages/bun-uws/src/WebSocketProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <string_view>

// bun-specific
#include "simdutf.h"
#include "wtf/SIMDUTF.h"

namespace uWS {

Expand Down
4 changes: 2 additions & 2 deletions src/bun.js/api/server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1904,13 +1904,13 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
// if signal is not aborted, abort the signal
if (this.signal) |signal| {
this.signal = null;
defer signal.unref();
if (!signal.aborted()) {
const reason = JSC.WebCore.AbortSignal.createAbortError(JSC.ZigString.static("The user aborted a request"), &JSC.ZigString.Empty, this.server.globalThis);
reason.ensureStillAlive();
_ = signal.signal(reason);
any_js_calls = true;
}
_ = signal.unref();
}

//if have sink, call onAborted on sink
Expand Down Expand Up @@ -1975,12 +1975,12 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
// if signal is not aborted, abort the signal
if (this.signal) |signal| {
this.signal = null;
defer signal.unref();
if (this.flags.aborted and !signal.aborted()) {
const reason = JSC.WebCore.AbortSignal.createAbortError(JSC.ZigString.static("The user aborted a request"), &JSC.ZigString.Empty, this.server.globalThis);
reason.ensureStillAlive();
_ = signal.signal(reason);
}
_ = signal.unref();
}

if (this.request_body) |body| {
Expand Down
2 changes: 1 addition & 1 deletion src/bun.js/bindings/Base64Helpers.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "root.h"
#include "simdutf.h"
#include "wtf/SIMDUTF.h"

#include "ExceptionOr.h"

Expand Down
12 changes: 9 additions & 3 deletions src/bun.js/bindings/BunClientData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ void JSVMClientData::create(VM* vm, void* bunVM)
auto provider = WebCore::createBuiltinsSourceProvider();
JSVMClientData* clientData = new JSVMClientData(*vm, provider);
clientData->bunVM = bunVM;
vm->deferredWorkTimer->onAddPendingWork = Bun::JSCTaskScheduler::onAddPendingWork;
vm->deferredWorkTimer->onScheduleWorkSoon = Bun::JSCTaskScheduler::onScheduleWorkSoon;
vm->deferredWorkTimer->onCancelPendingWork = Bun::JSCTaskScheduler::onCancelPendingWork;
vm->deferredWorkTimer->onAddPendingWork = [clientData](Ref<JSC::DeferredWorkTimer::TicketData>&& ticket, JSC::DeferredWorkTimer::WorkType kind) -> void {
Bun::JSCTaskScheduler::onAddPendingWork(clientData, WTFMove(ticket), kind);
};
vm->deferredWorkTimer->onScheduleWorkSoon = [clientData](JSC::DeferredWorkTimer::Ticket ticket, JSC::DeferredWorkTimer::Task&& task) -> void {
Bun::JSCTaskScheduler::onScheduleWorkSoon(clientData, ticket, WTFMove(task));
};
vm->deferredWorkTimer->onCancelPendingWork = [clientData](JSC::DeferredWorkTimer::Ticket ticket) -> void {
Bun::JSCTaskScheduler::onCancelPendingWork(clientData, ticket);
};

vm->clientData = clientData; // ~VM deletes this pointer.
clientData->m_normalWorld = DOMWrapperWorld::create(*vm, DOMWrapperWorld::Type::Normal);
Expand Down
6 changes: 3 additions & 3 deletions src/bun.js/bindings/BunObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static JSValue constructBunShell(VM& vm, JSObject* bunObject)
auto* globalObject = jsCast<Zig::GlobalObject*>(bunObject->globalObject());
JSFunction* createParsedShellScript = JSFunction::create(vm, bunObject->globalObject(), 2, "createParsedShellScript"_s, BunObject_callback_createParsedShellScript, ImplementationVisibility::Private, NoIntrinsic);
JSFunction* createShellInterpreterFunction = JSFunction::create(vm, bunObject->globalObject(), 1, "createShellInterpreter"_s, BunObject_callback_createShellInterpreter, ImplementationVisibility::Private, NoIntrinsic);
JSC::JSFunction* createShellFn = JSC::JSFunction::create(vm, shellCreateBunShellTemplateFunctionCodeGenerator(vm), globalObject);
JSC::JSFunction* createShellFn = JSC::JSFunction::create(vm, globalObject, shellCreateBunShellTemplateFunctionCodeGenerator(vm), globalObject);

auto scope = DECLARE_THROW_SCOPE(vm);
auto args = JSC::MarkedArgumentBuffer();
Expand Down Expand Up @@ -348,8 +348,8 @@ static JSValue constructBunPeekObject(VM& vm, JSObject* bunObject)
{
JSGlobalObject* globalObject = bunObject->globalObject();
JSC::Identifier identifier = JSC::Identifier::fromString(vm, "peek"_s);
JSFunction* peekFunction = JSFunction::create(vm, peekPeekCodeGenerator(vm), globalObject->globalScope());
JSFunction* peekStatus = JSFunction::create(vm, peekPeekStatusCodeGenerator(vm), globalObject->globalScope());
JSFunction* peekFunction = JSFunction::create(vm, globalObject, peekPeekCodeGenerator(vm), globalObject->globalScope());
JSFunction* peekStatus = JSFunction::create(vm, globalObject, peekPeekStatusCodeGenerator(vm), globalObject->globalScope());
peekFunction->putDirect(vm, PropertyName(JSC::Identifier::fromString(vm, "status"_s)), peekStatus, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontDelete | 0);

return peekFunction;
Expand Down
6 changes: 3 additions & 3 deletions src/bun.js/bindings/BunProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ static JSValue constructStdioWriteStream(JSC::JSGlobalObject* globalObject, int
auto& vm = globalObject->vm();
auto scope = DECLARE_THROW_SCOPE(vm);

JSC::JSFunction* getStdioWriteStream = JSC::JSFunction::create(vm, processObjectInternalsGetStdioWriteStreamCodeGenerator(vm), globalObject);
JSC::JSFunction* getStdioWriteStream = JSC::JSFunction::create(vm, globalObject, processObjectInternalsGetStdioWriteStreamCodeGenerator(vm), globalObject);
JSC::MarkedArgumentBuffer args;
args.append(JSC::jsNumber(fd));

Expand Down Expand Up @@ -1870,7 +1870,7 @@ static JSValue constructStdin(VM& vm, JSObject* processObject)
{
auto* globalObject = Bun__getDefaultGlobalObject();
auto scope = DECLARE_THROW_SCOPE(vm);
JSC::JSFunction* getStdioWriteStream = JSC::JSFunction::create(vm, processObjectInternalsGetStdinStreamCodeGenerator(vm), globalObject);
JSC::JSFunction* getStdioWriteStream = JSC::JSFunction::create(vm, globalObject, processObjectInternalsGetStdinStreamCodeGenerator(vm), globalObject);
JSC::MarkedArgumentBuffer args;
args.append(JSC::jsNumber(STDIN_FILENO));

Expand Down Expand Up @@ -2583,7 +2583,7 @@ static JSValue constructProcessNextTickFn(VM& vm, JSObject* processObject)
nextTickQueueObject = jsCast<Bun::JSNextTickQueue*>(globalObject->m_nextTickQueue.get());
}

JSC::JSFunction* initializer = JSC::JSFunction::create(vm, processObjectInternalsInitializeNextTickQueueCodeGenerator(vm), lexicalGlobalObject);
JSC::JSFunction* initializer = JSC::JSFunction::create(vm, globalObject, processObjectInternalsInitializeNextTickQueueCodeGenerator(vm), lexicalGlobalObject);

JSC::MarkedArgumentBuffer args;
args.append(processObject);
Expand Down
5 changes: 3 additions & 2 deletions src/bun.js/bindings/BunString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "JavaScriptCore/JSCJSValue.h"
#include "JavaScriptCore/PutPropertySlot.h"

#include "simdutf.h"
#include "wtf/SIMDUTF.h"
#include "JSDOMURL.h"
#include "DOMURL.h"
#include "ZigGlobalObject.h"
Expand Down Expand Up @@ -205,7 +205,8 @@ BunString toStringRef(WTF::StringImpl* wtfString)
return { BunStringTag::WTFStringImpl, { .wtf = wtfString } };
}

BunString toStringView(StringView view) {
BunString toStringView(StringView view)
{
return {
BunStringTag::ZigString,
{ .zig = toZigString(view) }
Expand Down
10 changes: 6 additions & 4 deletions src/bun.js/bindings/CommonJSModuleRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,20 +308,22 @@ void RequireFunctionPrototype::finishCreation(JSC::VM& vm)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
auto* globalObject = this->globalObject();

reifyStaticProperties(vm, info(), RequireFunctionPrototypeValues, *this);
JSC::JSFunction* requireDotMainFunction = JSFunction::create(
vm,
globalObject,
moduleMainCodeGenerator(vm),
globalObject()->globalScope());
globalObject->globalScope());

this->putDirectAccessor(
globalObject(),
globalObject,
JSC::Identifier::fromString(vm, "main"_s),
JSC::GetterSetter::create(vm, globalObject(), requireDotMainFunction, requireDotMainFunction),
JSC::GetterSetter::create(vm, globalObject, requireDotMainFunction, requireDotMainFunction),
PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | 0);

auto extensions = constructEmptyObject(globalObject());
auto extensions = constructEmptyObject(globalObject);
extensions->putDirect(vm, JSC::Identifier::fromString(vm, ".js"_s), jsBoolean(true), 0);
extensions->putDirect(vm, JSC::Identifier::fromString(vm, ".json"_s), jsBoolean(true), 0);
extensions->putDirect(vm, JSC::Identifier::fromString(vm, ".node"_s), jsBoolean(true), 0);
Expand Down
3 changes: 3 additions & 0 deletions src/bun.js/bindings/DOMFormData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@

#include "config.h"
#include "DOMFormData.h"
#include "wtf/DebugHeap.h"
#include <wtf/URLParser.h>

namespace WebCore {

DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(DOMFormData);

DOMFormData::DOMFormData(ScriptExecutionContext* context)
: ContextDestructionObserver(context)
{
Expand Down
3 changes: 3 additions & 0 deletions src/bun.js/bindings/DOMFormData.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ namespace WebCore {
template<typename> class ExceptionOr;
class HTMLElement;
class HTMLFormElement;
DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(DOMFormData);

class DOMFormData : public RefCounted<DOMFormData>, public ContextDestructionObserver {
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(DOMFormData);

public:
using FormDataEntryValue = std::variant<String, RefPtr<Blob>>;

Expand Down
2 changes: 1 addition & 1 deletion src/bun.js/bindings/ImportMetaObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class ImportMetaObjectPrototype final : public JSC::JSNonFinalObject {
reifyStaticProperties(vm, ImportMetaObject::info(), ImportMetaObjectPrototypeValues, *this);
JSC_TO_STRING_TAG_WITHOUT_TRANSITION();

auto mainGetter = JSFunction::create(vm, importMetaObjectMainCodeGenerator(vm), globalObject);
auto mainGetter = JSFunction::create(vm, globalObject, importMetaObjectMainCodeGenerator(vm), globalObject);

this->putDirectAccessor(
this->globalObject(),
Expand Down
2 changes: 1 addition & 1 deletion src/bun.js/bindings/InternalModuleRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void maybeAddCodeCoverage(JSC::VM& vm, const JSC::SourceCode& code)
maybeAddCodeCoverage(vm, source); \
JSFunction* func \
= JSFunction::create( \
vm, \
vm, globalObject, \
createBuiltinExecutable( \
vm, source, \
Identifier(), \
Expand Down
6 changes: 3 additions & 3 deletions src/bun.js/bindings/JSBundlerPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void JSBundlerPlugin::finishCreation(JSC::VM& vm)
auto* globalObject = init.owner->globalObject();

init.set(
JSC::JSFunction::create(vm, WebCore::bundlerPluginRunOnLoadPluginsCodeGenerator(vm), globalObject));
JSC::JSFunction::create(vm, globalObject, WebCore::bundlerPluginRunOnLoadPluginsCodeGenerator(vm), globalObject));
});

this->onResolveFunction.initLater(
Expand All @@ -268,7 +268,7 @@ void JSBundlerPlugin::finishCreation(JSC::VM& vm)
auto* globalObject = init.owner->globalObject();

init.set(
JSC::JSFunction::create(vm, WebCore::bundlerPluginRunOnResolvePluginsCodeGenerator(vm), globalObject));
JSC::JSFunction::create(vm, globalObject, WebCore::bundlerPluginRunOnResolvePluginsCodeGenerator(vm), globalObject));
});

this->setupFunction.initLater(
Expand All @@ -277,7 +277,7 @@ void JSBundlerPlugin::finishCreation(JSC::VM& vm)
auto* globalObject = init.owner->globalObject();

init.set(
JSC::JSFunction::create(vm, WebCore::bundlerPluginRunSetupFunctionCodeGenerator(vm), globalObject));
JSC::JSFunction::create(vm, globalObject, WebCore::bundlerPluginRunSetupFunctionCodeGenerator(vm), globalObject));
});

this->putDirect(vm, Identifier::fromString(vm, String("onLoad"_s)), jsUndefined(), 0);
Expand Down
42 changes: 20 additions & 22 deletions src/bun.js/bindings/JSCTaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,61 @@ extern "C" void Bun__eventLoop__incrementRefConcurrently(void* bunVM, int delta)

class JSCDeferredWorkTask {
public:
JSCDeferredWorkTask(Ticket ticket, Task&& task)
: ticket(ticket)
JSCDeferredWorkTask(Ref<TicketData> ticket, Task&& task)
: ticket(WTFMove(ticket))
, task(WTFMove(task))
{
}

Ticket ticket;
Ref<TicketData> ticket;
Task task;
~JSCDeferredWorkTask()
{
}

JSC::VM& vm() const { return ticket->scriptExecutionOwner()->vm(); }

WTF_MAKE_ISO_ALLOCATED(JSCDeferredWorkTask);
};

WTF_MAKE_ISO_ALLOCATED_IMPL(JSCDeferredWorkTask);

static JSC::VM& getVM(Ref<TicketData> ticket)
{
return ticket->scriptExecutionOwner()->vm();
}

static JSC::VM& getVM(Ticket& ticket)
{
return ticket->scriptExecutionOwner()->vm();
}

void JSCTaskScheduler::onAddPendingWork(Ref<TicketData> ticket, JSC::DeferredWorkTimer::WorkKind kind)
void JSCTaskScheduler::onAddPendingWork(WebCore::JSVMClientData* clientData, Ref<TicketData>&& ticket, JSC::DeferredWorkTimer::WorkType kind)
{
JSC::VM& vm = getVM(ticket);
auto clientData = WebCore::clientData(vm);
auto& scheduler = clientData->deferredWorkTimer;
Locker<Lock> holder { scheduler.m_lock };
if (kind != DeferredWorkTimer::WorkKind::Other) {

if (kind == DeferredWorkTimer::WorkType::ImminentlyScheduled) {
Bun__eventLoop__incrementRefConcurrently(clientData->bunVM, 1);
scheduler.m_pendingTicketsKeepingEventLoopAlive.add(WTFMove(ticket));
} else {
scheduler.m_pendingTicketsOther.add(WTFMove(ticket));
}
}
void JSCTaskScheduler::onScheduleWorkSoon(Ticket ticket, Task&& task)
void JSCTaskScheduler::onScheduleWorkSoon(WebCore::JSVMClientData* clientData, Ticket ticket, Task&& task)
{
auto* job = new JSCDeferredWorkTask(ticket, WTFMove(task));
Bun__queueJSCDeferredWorkTaskConcurrently(WebCore::clientData(getVM(ticket))->bunVM, job);
auto* job = new JSCDeferredWorkTask(*ticket, WTFMove(task));
Bun__queueJSCDeferredWorkTaskConcurrently(clientData->bunVM, job);
}

void JSCTaskScheduler::onCancelPendingWork(Ticket ticket)
void JSCTaskScheduler::onCancelPendingWork(WebCore::JSVMClientData* clientData, Ticket ticket)
{
auto& scheduler = WebCore::clientData(getVM(ticket))->deferredWorkTimer;
auto* bunVM = clientData->bunVM;
auto& scheduler = clientData->deferredWorkTimer;

Locker<Lock> holder { scheduler.m_lock };
bool isKeepingEventLoopAlive = scheduler.m_pendingTicketsKeepingEventLoopAlive.removeIf([ticket](auto pendingTicket) {
return pendingTicket.ptr() == ticket;
});
// -- At this point, ticket may be an invalid pointer.

if (isKeepingEventLoopAlive) {
holder.unlockEarly();
JSC::VM& vm = getVM(ticket);
Bun__eventLoop__incrementRefConcurrently(WebCore::clientData(vm)->bunVM, -1);
Bun__eventLoop__incrementRefConcurrently(bunVM, -1);
} else {
scheduler.m_pendingTicketsOther.removeIf([ticket](auto pendingTicket) {
return pendingTicket.ptr() == ticket;
Expand All @@ -91,15 +89,15 @@ static void runPendingWork(void* bunVM, Bun::JSCTaskScheduler& scheduler, JSCDef
holder.unlockEarly();

if (pendingTicket && !pendingTicket->isCancelled()) {
job->task(job->ticket);
job->task(job->ticket.ptr());
}

delete job;
}

extern "C" void Bun__runDeferredWork(Bun::JSCDeferredWorkTask* job)
{
auto& vm = getVM(job->ticket);
auto& vm = job->vm();
auto clientData = WebCore::clientData(vm);

runPendingWork(clientData->bunVM, clientData->deferredWorkTimer, job);
Expand Down
10 changes: 7 additions & 3 deletions src/bun.js/bindings/JSCTaskScheduler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

namespace WebCore {
class JSVMClientData;
}

#include <JavaScriptCore/DeferredWorkTimer.h>

namespace Bun {
Expand All @@ -12,9 +16,9 @@ class JSCTaskScheduler {
{
}

static void onAddPendingWork(Ref<JSC::DeferredWorkTimer::TicketData> ticket, JSC::DeferredWorkTimer::WorkKind kind);
static void onScheduleWorkSoon(JSC::DeferredWorkTimer::Ticket ticket, JSC::DeferredWorkTimer::Task&& task);
static void onCancelPendingWork(JSC::DeferredWorkTimer::Ticket ticket);
static void onAddPendingWork(WebCore::JSVMClientData* clientData, Ref<JSC::DeferredWorkTimer::TicketData>&& ticket, JSC::DeferredWorkTimer::WorkType kind);
static void onScheduleWorkSoon(WebCore::JSVMClientData* clientData, JSC::DeferredWorkTimer::Ticket ticket, JSC::DeferredWorkTimer::Task&& task);
static void onCancelPendingWork(WebCore::JSVMClientData* clientData, JSC::DeferredWorkTimer::Ticket ticket);

public:
Lock m_lock;
Expand Down
2 changes: 1 addition & 1 deletion src/bun.js/bindings/JSEnvironmentVariableMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ JSValue createEnvironmentVariablesMap(Zig::GlobalObject* globalObject)
Identifier::fromString(vm, BUN_CONFIG_VERBOSE_FETCH), JSC::CustomGetterSetter::create(vm, jsBunConfigVerboseFetchGetter, jsBunConfigVerboseFetchSetter), BUN_CONFIG_VERBOSE_FETCH_Attrs);

#if OS(WINDOWS)
JSC::JSFunction* getSourceEvent = JSC::JSFunction::create(vm, processObjectInternalsWindowsEnvCodeGenerator(vm), globalObject);
JSC::JSFunction* getSourceEvent = JSC::JSFunction::create(vm, globalObject, processObjectInternalsWindowsEnvCodeGenerator(vm), globalObject);
RETURN_IF_EXCEPTION(scope, {});
JSC::MarkedArgumentBuffer args;
args.append(object);
Expand Down
1 change: 1 addition & 0 deletions src/bun.js/bindings/ModuleLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ extern "C" void Bun__onFulfillAsyncModule(

if (auto entry = globalObject->esmRegistryMap()->get(globalObject, specifierValue)) {
if (entry.isObject()) {

auto* object = entry.getObject();
if (auto state = object->getIfPropertyExists(globalObject, Bun::builtinNames(vm).statePublicName())) {
if (state.toInt32(globalObject) > JSC::JSModuleLoader::Status::Fetch) {
Expand Down
Loading
Loading