From 252efe8dc53ecc7c5fe2eb795376423e493376b9 Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Wed, 4 Jun 2025 15:56:39 -0700 Subject: [PATCH] postImmediateCppTask was unused --- src/bun.js/bindings/ScriptExecutionContext.cpp | 11 ----------- src/bun.js/bindings/ScriptExecutionContext.h | 6 +----- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/bun.js/bindings/ScriptExecutionContext.cpp b/src/bun.js/bindings/ScriptExecutionContext.cpp index cefd07af6a..490a979771 100644 --- a/src/bun.js/bindings/ScriptExecutionContext.cpp +++ b/src/bun.js/bindings/ScriptExecutionContext.cpp @@ -382,17 +382,6 @@ void ScriptExecutionContext::postTask(EventLoopTask* task) { static_cast(m_globalObject)->queueTask(task); } -// Executes the task on context's thread immediately. -void ScriptExecutionContext::postImmediateCppTask(Function&& lambda) -{ - auto* task = new EventLoopTask(WTFMove(lambda)); - static_cast(m_globalObject)->queueImmediateCppTask(task); -} -// Executes the task on context's thread immediately. -void ScriptExecutionContext::postImmediateCppTask(EventLoopTask* task) -{ - static_cast(m_globalObject)->queueImmediateCppTask(task); -} // Executes the task on context's thread asynchronously. void ScriptExecutionContext::postTaskOnTimeout(EventLoopTask* task, Seconds timeout) { diff --git a/src/bun.js/bindings/ScriptExecutionContext.h b/src/bun.js/bindings/ScriptExecutionContext.h index f950b6514c..9a1e7e9d4c 100644 --- a/src/bun.js/bindings/ScriptExecutionContext.h +++ b/src/bun.js/bindings/ScriptExecutionContext.h @@ -134,11 +134,7 @@ public: void postTaskOnTimeout(EventLoopTask* task, Seconds timeout); // Executes the task on context's thread asynchronously. void postTaskOnTimeout(Function&& lambda, Seconds timeout); - // Executes the task on context's thread immediately. - void postImmediateCppTask(Function&& lambda); - // Executes the task on context's thread immediately. - void postImmediateCppTask(EventLoopTask* task); - // Queues the task to the immediate cpp queue + void queueImmediateCppTask(Function&& lambda); void queueImmediateCppTask(EventLoopTask* task);