From 7f375919ffdd296420d94ad3cb25bba84331cf02 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Thu, 1 Aug 2024 16:51:20 -0700 Subject: [PATCH] test --- src/bun.js/bindings/JSCTaskScheduler.cpp | 5 ++--- src/bun.js/bindings/JSCTaskScheduler.h | 2 +- src/bun.js/bindings/ZigGlobalObject.cpp | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bun.js/bindings/JSCTaskScheduler.cpp b/src/bun.js/bindings/JSCTaskScheduler.cpp index ae090cf1c739be..3eb1657544687c 100644 --- a/src/bun.js/bindings/JSCTaskScheduler.cpp +++ b/src/bun.js/bindings/JSCTaskScheduler.cpp @@ -39,14 +39,13 @@ static JSC::VM& getVM(Ticket& ticket) return ticket->scriptExecutionOwner()->vm(); } -void JSCTaskScheduler::onAddPendingWork(Ref ticket, JSC::DeferredWorkTimer::WorkKind kind) +void JSCTaskScheduler::onAddPendingWork(Ref ticket, JSC::DeferredWorkTimer::WorkType kind) { JSC::VM& vm = getVM(ticket); auto clientData = WebCore::clientData(vm); auto& scheduler = clientData->deferredWorkTimer; Locker 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 { diff --git a/src/bun.js/bindings/JSCTaskScheduler.h b/src/bun.js/bindings/JSCTaskScheduler.h index 325f063975d1e6..c5abbf244b32ee 100644 --- a/src/bun.js/bindings/JSCTaskScheduler.h +++ b/src/bun.js/bindings/JSCTaskScheduler.h @@ -12,7 +12,7 @@ class JSCTaskScheduler { { } - static void onAddPendingWork(Ref ticket, JSC::DeferredWorkTimer::WorkKind kind); + static void onAddPendingWork(Ref ticket, JSC::DeferredWorkTimer::WorkType kind); static void onScheduleWorkSoon(JSC::DeferredWorkTimer::Ticket ticket, JSC::DeferredWorkTimer::Task&& task); static void onCancelPendingWork(JSC::DeferredWorkTimer::Ticket ticket); diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 05f8adec31711f..61d2ca7310bca7 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -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;