Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

Issue 2350733002: Revert of Add tests for trace wrappers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 1000
1001 void ThreadState::makeConsistentForMutator() 1001 void ThreadState::makeConsistentForMutator()
1002 { 1002 {
1003 ASSERT(isInGC()); 1003 ASSERT(isInGC());
1004 for (int i = 0; i < BlinkGC::NumberOfArenas; ++i) 1004 for (int i = 0; i < BlinkGC::NumberOfArenas; ++i)
1005 m_arenas[i]->makeConsistentForMutator(); 1005 m_arenas[i]->makeConsistentForMutator();
1006 } 1006 }
1007 1007
1008 void ThreadState::preGC() 1008 void ThreadState::preGC()
1009 { 1009 {
1010 if (RuntimeEnabledFeatures::traceWrappablesEnabled() && m_isolate && m_perfo rmCleanup) 1010 if (RuntimeEnabledFeatures::traceWrappablesEnabled() && m_performCleanup)
1011 m_performCleanup(m_isolate); 1011 m_performCleanup(m_isolate);
1012 1012
1013 ASSERT(!isInGC()); 1013 ASSERT(!isInGC());
1014 setGCState(GCRunning); 1014 setGCState(GCRunning);
1015 makeConsistentForGC(); 1015 makeConsistentForGC();
1016 flushHeapDoesNotContainCacheIfNeeded(); 1016 flushHeapDoesNotContainCacheIfNeeded();
1017 clearArenaAges(); 1017 clearArenaAges();
1018 1018
1019 // It is possible, albeit rare, for a thread to be kept 1019 // It is possible, albeit rare, for a thread to be kept
1020 // at a safepoint across multiple GCs, as resuming all attached 1020 // at a safepoint across multiple GCs, as resuming all attached
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 for (int i = 0; i < 5; ++i) { 1747 for (int i = 0; i < 5; ++i) {
1748 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, Bli nkGC::ForcedGC); 1748 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, Bli nkGC::ForcedGC);
1749 size_t liveObjects = heap().heapStats().markedObjectSize(); 1749 size_t liveObjects = heap().heapStats().markedObjectSize();
1750 if (liveObjects == previousLiveObjects) 1750 if (liveObjects == previousLiveObjects)
1751 break; 1751 break;
1752 previousLiveObjects = liveObjects; 1752 previousLiveObjects = liveObjects;
1753 } 1753 }
1754 } 1754 }
1755 1755
1756 } // namespace blink 1756 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698