Skip to content

Commit

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

void JSCTaskScheduler::onAddPendingWork(Ref<TicketData> ticket, JSC::DeferredWorkTimer::WorkType kind)
void JSCTaskScheduler::onAddPendingWork(Ref<TicketData>&& ticket, JSC::DeferredWorkTimer::WorkType kind)
{
JSC::VM& vm = getVM(ticket);
auto clientData = WebCore::clientData(vm);
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::WorkType 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

0 comments on commit b818f4a

Please sign in to comment.