OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 } | 1020 } |
1021 | 1021 |
1022 void ThreadState::waitUntilSweepersDone() | 1022 void ThreadState::waitUntilSweepersDone() |
1023 { | 1023 { |
1024 MutexLocker locker(m_sweepMutex); | 1024 MutexLocker locker(m_sweepMutex); |
1025 while (m_numberOfSweeperTasks > 0) | 1025 while (m_numberOfSweeperTasks > 0) |
1026 m_sweepThreadCondition.wait(m_sweepMutex); | 1026 m_sweepThreadCondition.wait(m_sweepMutex); |
1027 } | 1027 } |
1028 | 1028 |
1029 | 1029 |
1030 class SweepNonFinalizedHeapTask FINAL : public WebThread::Task { | 1030 class SweepNonFinalizedHeapTask final : public WebThread::Task { |
1031 public: | 1031 public: |
1032 SweepNonFinalizedHeapTask(ThreadState* state, BaseHeap* heap, HeapStats* sta
ts) | 1032 SweepNonFinalizedHeapTask(ThreadState* state, BaseHeap* heap, HeapStats* sta
ts) |
1033 : m_threadState(state) | 1033 : m_threadState(state) |
1034 , m_heap(heap) | 1034 , m_heap(heap) |
1035 , m_stats(stats) | 1035 , m_stats(stats) |
1036 { | 1036 { |
1037 m_threadState->registerSweepingTask(); | 1037 m_threadState->registerSweepingTask(); |
1038 } | 1038 } |
1039 | 1039 |
1040 virtual ~SweepNonFinalizedHeapTask() | 1040 virtual ~SweepNonFinalizedHeapTask() |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 return gcInfo; | 1261 return gcInfo; |
1262 } | 1262 } |
1263 } | 1263 } |
1264 if (needLockForIteration) | 1264 if (needLockForIteration) |
1265 threadAttachMutex().unlock(); | 1265 threadAttachMutex().unlock(); |
1266 return 0; | 1266 return 0; |
1267 } | 1267 } |
1268 #endif | 1268 #endif |
1269 | 1269 |
1270 } | 1270 } |
OLD | NEW |