Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Unified Diff: src/isolate.cc

Issue 1785403002: [runtime] split up loops with HandleScopes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comment Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
- }
+ });
}
}
« no previous file with comments | « src/isolate.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698