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

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

Issue 2725063003: Migrate WTF::LinkedHashSet/ListHashSet/HashTable::remove() to ::erase() (Closed)
Patch Set: rebase Created 3 years, 9 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
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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 // The registered prefinalizer entry must then be removed and deleted. 1283 // The registered prefinalizer entry must then be removed and deleted.
1284 // 1284 //
1285 auto it = --m_orderedPreFinalizers.end(); 1285 auto it = --m_orderedPreFinalizers.end();
1286 bool done; 1286 bool done;
1287 do { 1287 do {
1288 auto entry = it; 1288 auto entry = it;
1289 done = it == m_orderedPreFinalizers.begin(); 1289 done = it == m_orderedPreFinalizers.begin();
1290 if (!done) 1290 if (!done)
1291 --it; 1291 --it;
1292 if ((entry->second)(entry->first)) 1292 if ((entry->second)(entry->first))
1293 m_orderedPreFinalizers.remove(entry); 1293 m_orderedPreFinalizers.erase(entry);
1294 } while (!done); 1294 } while (!done);
1295 } 1295 }
1296 if (isMainThread()) { 1296 if (isMainThread()) {
1297 double timeForInvokingPreFinalizers = WTF::currentTimeMS() - startTime; 1297 double timeForInvokingPreFinalizers = WTF::currentTimeMS() - startTime;
1298 DEFINE_STATIC_LOCAL( 1298 DEFINE_STATIC_LOCAL(
1299 CustomCountHistogram, preFinalizersHistogram, 1299 CustomCountHistogram, preFinalizersHistogram,
1300 ("BlinkGC.TimeForInvokingPreFinalizers", 1, 10 * 1000, 50)); 1300 ("BlinkGC.TimeForInvokingPreFinalizers", 1, 10 * 1000, 50));
1301 preFinalizersHistogram.count(timeForInvokingPreFinalizers); 1301 preFinalizersHistogram.count(timeForInvokingPreFinalizers);
1302 } 1302 }
1303 } 1303 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, 1558 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep,
1559 BlinkGC::ForcedGC); 1559 BlinkGC::ForcedGC);
1560 size_t liveObjects = heap().heapStats().markedObjectSize(); 1560 size_t liveObjects = heap().heapStats().markedObjectSize();
1561 if (liveObjects == previousLiveObjects) 1561 if (liveObjects == previousLiveObjects)
1562 break; 1562 break;
1563 previousLiveObjects = liveObjects; 1563 previousLiveObjects = liveObjects;
1564 } 1564 }
1565 } 1565 }
1566 1566
1567 } // namespace blink 1567 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698