Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Aug 1, 2024
1 parent 1c1de31 commit 7f37591
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/bun.js/bindings/JSCTaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ static JSC::VM& getVM(Ticket& ticket)
return ticket->scriptExecutionOwner()->vm();
}

void JSCTaskScheduler::onAddPendingWork(Ref<TicketData> ticket, JSC::DeferredWorkTimer::WorkKind kind)
void JSCTaskScheduler::onAddPendingWork(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 {
Expand Down
2 changes: 1 addition & 1 deletion src/bun.js/bindings/JSCTaskScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class JSCTaskScheduler {
{
}

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

Expand Down
2 changes: 2 additions & 0 deletions src/bun.js/bindings/ZigGlobalObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ extern "C" void JSCInitialize(const char* envp[], size_t envc, void (*onCrash)(c
JSC::Options::usePromiseWithResolversMethod() = true;
JSC::Options::useV8DateParser() = true;
JSC::Options::evalMode() = evalMode;
JSC::Options::usePromiseTryMethod() = true;
JSC::Options::useRegExpEscape() = true;

#ifdef BUN_DEBUG
JSC::Options::showPrivateScriptsInStackTraces() = true;
Expand Down

0 comments on commit 7f37591

Please sign in to comment.