| 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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 #endif | 1213 #endif |
| 1214 ASSERT(stackState == BlinkGC::NoHeapPointersOnStack || scopeMarker); | 1214 ASSERT(stackState == BlinkGC::NoHeapPointersOnStack || scopeMarker); |
| 1215 runScheduledGC(stackState); | 1215 runScheduledGC(stackState); |
| 1216 ASSERT(!m_atSafePoint); | 1216 ASSERT(!m_atSafePoint); |
| 1217 m_atSafePoint = true; | 1217 m_atSafePoint = true; |
| 1218 m_stackState = stackState; | 1218 m_stackState = stackState; |
| 1219 m_safePointScopeMarker = scopeMarker; | 1219 m_safePointScopeMarker = scopeMarker; |
| 1220 m_heap->enterSafePoint(this); | 1220 m_heap->enterSafePoint(this); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 void ThreadState::leaveSafePoint(SafePointAwareMutexLocker* locker) { | 1223 void ThreadState::leaveSafePoint() { |
| 1224 ASSERT(checkThread()); | 1224 ASSERT(checkThread()); |
| 1225 ASSERT(m_atSafePoint); | 1225 ASSERT(m_atSafePoint); |
| 1226 m_heap->leaveSafePoint(this, locker); | 1226 m_heap->leaveSafePoint(); |
| 1227 m_atSafePoint = false; | 1227 m_atSafePoint = false; |
| 1228 m_stackState = BlinkGC::HeapPointersOnStack; | 1228 m_stackState = BlinkGC::HeapPointersOnStack; |
| 1229 clearSafePointScopeMarker(); | 1229 clearSafePointScopeMarker(); |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 void ThreadState::reportMemoryToV8() { | 1232 void ThreadState::reportMemoryToV8() { |
| 1233 if (!m_isolate) | 1233 if (!m_isolate) |
| 1234 return; | 1234 return; |
| 1235 | 1235 |
| 1236 size_t currentHeapSize = m_allocatedObjectSize + m_markedObjectSize; | 1236 size_t currentHeapSize = m_allocatedObjectSize + m_markedObjectSize; |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, | 1639 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, |
| 1640 BlinkGC::ForcedGC); | 1640 BlinkGC::ForcedGC); |
| 1641 size_t liveObjects = heap().heapStats().markedObjectSize(); | 1641 size_t liveObjects = heap().heapStats().markedObjectSize(); |
| 1642 if (liveObjects == previousLiveObjects) | 1642 if (liveObjects == previousLiveObjects) |
| 1643 break; | 1643 break; |
| 1644 previousLiveObjects = liveObjects; | 1644 previousLiveObjects = liveObjects; |
| 1645 } | 1645 } |
| 1646 } | 1646 } |
| 1647 | 1647 |
| 1648 } // namespace blink | 1648 } // namespace blink |
| OLD | NEW |