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

Unified Diff: src/heap/mark-compact.cc

Issue 2462553002: [heap] Do not wait for marking deque uncommit task on tear down. (Closed)
Patch Set: fix test 2 Created 4 years, 2 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/heap/mark-compact.h ('k') | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index d113221edcde594fc51a59c38d43554793b8196b..1a85216e3ff6ce84299081d8bbe3414b6f2a1319 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2119,7 +2119,6 @@ void MarkingDeque::SetUp() {
}
void MarkingDeque::TearDown() {
- CancelOrWaitForUncommitTask();
delete backing_store_;
}
@@ -2187,26 +2186,13 @@ void MarkingDeque::EnsureCommitted() {
void MarkingDeque::StartUncommitTask() {
if (!uncommit_task_pending_) {
- UncommitTask* task = new UncommitTask(heap_->isolate(), this);
- uncommit_task_id_ = task->id();
uncommit_task_pending_ = true;
+ UncommitTask* task = new UncommitTask(heap_->isolate(), this);
V8::GetCurrentPlatform()->CallOnBackgroundThread(
task, v8::Platform::kShortRunningTask);
}
}
-void MarkingDeque::CancelOrWaitForUncommitTask() {
- base::LockGuard<base::Mutex> guard(&mutex_);
- if (!uncommit_task_pending_ ||
- heap_->isolate()->cancelable_task_manager()->TryAbort(
- uncommit_task_id_) != CancelableTaskManager::kTaskRunning) {
- return;
- }
- while (uncommit_task_pending_) {
- uncommit_task_barrier_.Wait(&mutex_);
- }
-}
-
class MarkCompactCollector::ObjectStatsVisitor
: public MarkCompactCollector::HeapObjectVisitor {
public:
« no previous file with comments | « src/heap/mark-compact.h ('k') | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698