File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -3673,10 +3673,20 @@ int NumberOfPointerUpdateTasks(int pages) {
3673
3673
3674
3674
template <PointerDirection direction>
3675
3675
void UpdatePointersInParallel (Heap* heap, base::Semaphore* semaphore) {
3676
+ // Work-around bug in clang-3.4
3677
+ // https://github.com/nodejs/node/issues/8323
3678
+ struct MemoryChunkVisitor {
3679
+ PageParallelJob<PointerUpdateJobTraits<direction> >& job_;
3680
+ MemoryChunkVisitor (PageParallelJob<PointerUpdateJobTraits<direction> >& job)
3681
+ : job_(job) {}
3682
+ void operator ()(MemoryChunk* chunk) {
3683
+ job_.AddPage (chunk, 0 );
3684
+ }
3685
+ };
3686
+
3676
3687
PageParallelJob<PointerUpdateJobTraits<direction> > job (
3677
3688
heap, heap->isolate ()->cancelable_task_manager (), semaphore);
3678
- RememberedSet<direction>::IterateMemoryChunks (
3679
- heap, [&job](MemoryChunk* chunk) { job.AddPage (chunk, 0 ); });
3689
+ RememberedSet<direction>::IterateMemoryChunks (heap, MemoryChunkVisitor (job));
3680
3690
int num_pages = job.NumberOfPages ();
3681
3691
int num_tasks = NumberOfPointerUpdateTasks (num_pages);
3682
3692
job.Run (num_tasks, [](int i) { return 0 ; });
You can’t perform that action at this time.
0 commit comments