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

Unified Diff: src/heap/incremental-marking-job.cc

Issue 2407153002: [heap] Use RAIL mode for initial heap sizing (Closed)
Patch Set: fix test Created 4 years 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/heap/incremental-marking-job.h ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking-job.cc
diff --git a/src/heap/incremental-marking-job.cc b/src/heap/incremental-marking-job.cc
index 393b9cce7eeace05b893679d448bfb54490261df..e441261c84bee72cdda12b8e50a4f56bd48c3345 100644
--- a/src/heap/incremental-marking-job.cc
+++ b/src/heap/incremental-marking-job.cc
@@ -19,12 +19,11 @@ void IncrementalMarkingJob::Start(Heap* heap) {
ScheduleTask(heap);
}
-void IncrementalMarkingJob::NotifyTask() { task_pending_ = false; }
+void IncrementalMarkingJob::NotifyTask() { task_pending_.SetValue(false); }
void IncrementalMarkingJob::ScheduleTask(Heap* heap) {
- if (!task_pending_) {
+ if (task_pending_.TrySetValue(false, true)) {
v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(heap->isolate());
- task_pending_ = true;
auto task = new Task(heap->isolate(), this);
V8::GetCurrentPlatform()->CallOnForegroundThread(isolate, task);
}
« no previous file with comments | « src/heap/incremental-marking-job.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698