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 @@ -3700,10 +3700,20 @@ int NumberOfPointerUpdateTasks(int pages) {
3700
3700
3701
3701
template <PointerDirection direction>
3702
3702
void UpdatePointersInParallel (Heap* heap, base::Semaphore* semaphore) {
3703
+ // Work-around bug in clang-3.4
3704
+ // https://github.com/nodejs/node/issues/8323
3705
+ struct MemoryChunkVisitor {
3706
+ PageParallelJob<PointerUpdateJobTraits<direction> >& job_;
3707
+ MemoryChunkVisitor (PageParallelJob<PointerUpdateJobTraits<direction> >& job)
3708
+ : job_(job) {}
3709
+ void operator ()(MemoryChunk* chunk) {
3710
+ job_.AddPage (chunk, 0 );
3711
+ }
3712
+ };
3713
+
3703
3714
PageParallelJob<PointerUpdateJobTraits<direction> > job (
3704
3715
heap, heap->isolate ()->cancelable_task_manager (), semaphore);
3705
- RememberedSet<direction>::IterateMemoryChunks (
3706
- heap, [&job](MemoryChunk* chunk) { job.AddPage (chunk, 0 ); });
3716
+ RememberedSet<direction>::IterateMemoryChunks (heap, MemoryChunkVisitor (job));
3707
3717
int num_pages = job.NumberOfPages ();
3708
3718
int num_tasks = NumberOfPointerUpdateTasks (num_pages);
3709
3719
job.Run (num_tasks, [](int i) { return 0 ; });
You can’t perform that action at this time.
0 commit comments