File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,13 @@ bool v8__Platform__PumpMessageLoop(
125125 wait_for_work ? v8::platform::MessageLoopBehavior::kWaitForWork : v8::platform::MessageLoopBehavior::kDoNotWait );
126126}
127127
128+ void v8__Platform__RunIdleTasks (
129+ v8::Platform* platform,
130+ v8::Isolate* isolate,
131+ double idle_time_in_seconds) {
132+ v8::platform::RunIdleTasks (platform, isolate, idle_time_in_seconds);
133+ }
134+
128135// Root
129136
130137const v8::Primitive* v8__Undefined (v8::Isolate* isolate) {
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ typedef struct Platform Platform;
127127Platform * v8__Platform__NewDefaultPlatform (int thread_pool_size , int idle_task_support );
128128void v8__Platform__DELETE (Platform * platform );
129129bool v8__Platform__PumpMessageLoop (Platform * platform , Isolate * isolate , bool wait_for_work );
130+ void v8__Platform__RunIdleTasks (Platform * platform , Isolate * isolate , double idle_time_in_seconds );
130131
131132// Root
132133const Primitive * v8__Undefined (Isolate * isolate );
Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ pub const Platform = struct {
154154 pub fn pumpMessageLoop (self : Self , isolate : Isolate , wait_for_work : bool ) bool {
155155 return c .v8__Platform__PumpMessageLoop (self .handle , isolate .handle , wait_for_work );
156156 }
157+
158+ pub fn runIdleTasks (self : Self , isolate : Isolate , idle_time_in_seconds : u32 ) void {
159+ c .v8__Platform__RunIdleTasks (self .handle , isolate .handle , @floatFromInt (idle_time_in_seconds ));
160+ }
157161};
158162
159163pub fn getVersion () []const u8 {
You can’t perform that action at this time.
0 commit comments