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 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 m_safePointStackCopy[i] = from[i]; | 1458 m_safePointStackCopy[i] = from[i]; |
1459 } | 1459 } |
1460 } | 1460 } |
1461 | 1461 |
1462 void ThreadState::addInterruptor( | 1462 void ThreadState::addInterruptor( |
1463 std::unique_ptr<BlinkGCInterruptor> interruptor) { | 1463 std::unique_ptr<BlinkGCInterruptor> interruptor) { |
1464 ASSERT(checkThread()); | 1464 ASSERT(checkThread()); |
1465 SafePointScope scope(BlinkGC::HeapPointersOnStack); | 1465 SafePointScope scope(BlinkGC::HeapPointersOnStack); |
1466 { | 1466 { |
1467 MutexLocker locker(m_heap->threadAttachMutex()); | 1467 MutexLocker locker(m_heap->threadAttachMutex()); |
1468 m_interruptors.append(std::move(interruptor)); | 1468 m_interruptors.push_back(std::move(interruptor)); |
1469 } | 1469 } |
1470 } | 1470 } |
1471 | 1471 |
1472 void ThreadState::registerStaticPersistentNode( | 1472 void ThreadState::registerStaticPersistentNode( |
1473 PersistentNode* node, | 1473 PersistentNode* node, |
1474 PersistentClearCallback callback) { | 1474 PersistentClearCallback callback) { |
1475 #if defined(LEAK_SANITIZER) | 1475 #if defined(LEAK_SANITIZER) |
1476 if (m_disabledStaticPersistentsRegistration) | 1476 if (m_disabledStaticPersistentsRegistration) |
1477 return; | 1477 return; |
1478 #endif | 1478 #endif |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, | 1858 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, |
1859 BlinkGC::ForcedGC); | 1859 BlinkGC::ForcedGC); |
1860 size_t liveObjects = heap().heapStats().markedObjectSize(); | 1860 size_t liveObjects = heap().heapStats().markedObjectSize(); |
1861 if (liveObjects == previousLiveObjects) | 1861 if (liveObjects == previousLiveObjects) |
1862 break; | 1862 break; |
1863 previousLiveObjects = liveObjects; | 1863 previousLiveObjects = liveObjects; |
1864 } | 1864 } |
1865 } | 1865 } |
1866 | 1866 |
1867 } // namespace blink | 1867 } // namespace blink |
OLD | NEW |