aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/heap
diff options
context:
space:
mode:
authorMatt Loring <mattloring@google.com>2017-08-03 07:14:43 -0700
committerAnna Henningsen <anna@addaleax.net>2017-09-13 16:16:28 +0200
commit5976e0fac9af2370ad7b2b54b7c223c6f8b3d046 (patch)
tree9f4777b1579c240051cf1a7d66032998264fe4cc /deps/v8/src/heap
parente1c37b3692773a5be9c1c1e0f959f2378fab36ef (diff)
downloadandroid-node-v8-5976e0fac9af2370ad7b2b54b7c223c6f8b3d046.tar.gz
android-node-v8-5976e0fac9af2370ad7b2b54b7c223c6f8b3d046.tar.bz2
android-node-v8-5976e0fac9af2370ad7b2b54b7c223c6f8b3d046.zip
deps: backport bca8409 from upstream V8
Original commit message: Make CancelableTask ids unique They were only limited to 32 bit when using the internal Hashmap. Since this has changed alreay some time ago, we can switch to 64 bit ids and check that we never overflow. Bug: Change-Id: Ia6c6d02d6b5e555c6941185a79427dc4aa2a1d62 Reviewed-on: https://chromium-review.googlesource.com/598229 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#47085} PR-URL: https://github.com/nodejs/node/pull/14001 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'deps/v8/src/heap')
-rw-r--r--deps/v8/src/heap/item-parallel-job.h3
-rw-r--r--deps/v8/src/heap/mark-compact.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/deps/v8/src/heap/item-parallel-job.h b/deps/v8/src/heap/item-parallel-job.h
index 432d884bda..23c709f87b 100644
--- a/deps/v8/src/heap/item-parallel-job.h
+++ b/deps/v8/src/heap/item-parallel-job.h
@@ -136,7 +136,8 @@ class ItemParallelJob {
const size_t num_tasks = tasks_.size();
const size_t num_items = items_.size();
const size_t items_per_task = (num_items + num_tasks - 1) / num_tasks;
- uint32_t* task_ids = new uint32_t[num_tasks];
+ CancelableTaskManager::Id* task_ids =
+ new CancelableTaskManager::Id[num_tasks];
size_t start_index = 0;
Task* main_task = nullptr;
Task* task = nullptr;
diff --git a/deps/v8/src/heap/mark-compact.h b/deps/v8/src/heap/mark-compact.h
index 9ea365e405..8460fa7841 100644
--- a/deps/v8/src/heap/mark-compact.h
+++ b/deps/v8/src/heap/mark-compact.h
@@ -553,7 +553,7 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
Heap* const heap_;
int num_tasks_;
- uint32_t task_ids_[kMaxSweeperTasks];
+ CancelableTaskManager::Id task_ids_[kMaxSweeperTasks];
base::Semaphore pending_sweeper_tasks_semaphore_;
base::Mutex mutex_;
SweptList swept_list_[kAllocationSpaces];