Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index b7665d749d5ac7074656709604d3a1fba11c8399..91a8d23c5beba85edd757bf3c4c06c0789103bdf 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2783,8 +2783,8 @@ void Isolate::RunMicrotasksInternal() { |
set_pending_microtask_count(0); |
heap()->set_microtask_queue(heap()->empty_fixed_array()); |
- for (int i = 0; i < num_tasks; i++) { |
- HandleScope scope(this); |
+ Isolate* isolate = this; |
+ FOR_WITH_HANDLE_SCOPE(isolate, int, i = 0, i, i < num_tasks, i++, { |
Handle<Object> microtask(queue->get(i), this); |
if (microtask->IsJSFunction()) { |
Handle<JSFunction> microtask_function = |
@@ -2811,7 +2811,7 @@ void Isolate::RunMicrotasksInternal() { |
void* data = v8::ToCData<void*>(callback_info->data()); |
callback(data); |
} |
- } |
+ }); |
} |
} |