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

Unified Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

Issue 1805343004: (Only) poison unmarked heap objects prior to sweeping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove dated assert Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index a31d6d47e14a095858c0fa1d44e6d1cd73c22c3a..f7b82e7f8f3484ba84bafb9cbdd0385b2e8ce842 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -1033,14 +1033,11 @@ void ThreadState::preSweep()
m_accumulatedSweepingTime = 0;
-#if defined(ADDRESS_SANITIZER)
- poisonEagerArena(BlinkGC::SetPoison);
-#endif
eagerSweep();
+
#if defined(ADDRESS_SANITIZER)
poisonAllHeaps();
#endif
-
if (previousGCState == EagerSweepScheduled) {
// Eager sweeping should happen only in testing.
completeSweep();
@@ -1055,25 +1052,26 @@ void ThreadState::poisonAllHeaps()
{
// TODO(Oilpan): enable the poisoning always.
#if ENABLE(OILPAN)
- // Unpoison the live objects remaining in the eager arenas..
- poisonEagerArena(BlinkGC::ClearPoison);
// ..along with poisoning all unmarked objects in the other arenas.
for (int i = 1; i < BlinkGC::NumberOfArenas; i++)
- m_arenas[i]->poisonArena(BlinkGC::UnmarkedOnly, BlinkGC::SetPoison);
+ m_arenas[i]->poisonArena();
#endif
}
-void ThreadState::poisonEagerArena(BlinkGC::Poisoning poisoning)
+void ThreadState::poisonEagerArena()
{
// TODO(Oilpan): enable the poisoning always.
#if ENABLE(OILPAN)
- m_arenas[BlinkGC::EagerSweepArenaIndex]->poisonArena(BlinkGC::MarkedAndUnmarked, poisoning);
+ m_arenas[BlinkGC::EagerSweepArenaIndex]->poisonArena();
#endif
}
#endif
void ThreadState::eagerSweep()
{
+#if defined(ADDRESS_SANITIZER)
+ poisonEagerArena();
+#endif
ASSERT(checkThread());
// Some objects need to be finalized promptly and cannot be handled
// by lazy sweeping. Keep those in a designated heap and sweep it
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698