Skip to content

Commit 8c7e5df

Browse files
committed
expose Isolate::HasPendingBackgroundTasks
1 parent 4aa1aec commit 8c7e5df

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/binding.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ void v8__Isolate__EnqueueMicrotaskFunc(v8::Isolate* self, const v8::Function* fu
423423
self->EnqueueMicrotask(ptr_to_local(function));
424424
}
425425

426+
bool v8__Isolate__HasPendingBackgroundTasks(v8::Isolate* self) {
427+
return self->HasPendingBackgroundTasks();
428+
}
429+
426430
// MicrotaskQueue
427431

428432
v8::MicrotaskQueue* v8__MicrotaskQueue__New(

src/binding.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ void* v8__Isolate__GetData(Isolate* self, int idx);
300300
void v8__Isolate__SetData(Isolate* self, int idx, void* val);
301301
void v8__Isolate__EnqueueMicrotask(Isolate* self, MicrotaskCallback callback, void* data);
302302
void v8__Isolate__EnqueueMicrotaskFunc(Isolate* self, const Function* function);
303+
bool v8__Isolate__HasPendingBackgroundTasks(Isolate *self);
303304
const Data* v8__Isolate__GetDataFromSnapshotOnce(const Isolate *self, size_t idx);
304305

305306
typedef struct StartupData {

0 commit comments

Comments
 (0)