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

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

Issue 940963005: Revert of WebAudio: Fix AudioNode leak in a case that AudioNode is not disconnected from the ... (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « 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: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index 0ae8284286368653772f4242475dd2bbe5d75e9d..a552cc3bcace888a7640d578698db16cd19550bd 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -918,7 +918,6 @@
flushHeapDoesNotContainCacheIfNeeded();
if (isMainThread())
m_allocatedObjectSizeBeforeGC = Heap::allocatedObjectSize() + Heap::markedObjectSize();
- invokePreMarkingTasks();
}
void ThreadState::postGC(GCType gcType)
@@ -943,40 +942,9 @@
}
#endif
- invokePostMarkingTasks();
setGCState(gcType == GCWithSweep ? EagerSweepScheduled : LazySweepScheduled);
for (int i = 0; i < NumberOfHeaps; i++)
m_heaps[i]->prepareForSweep();
-}
-
-void ThreadState::invokePreMarkingTasks()
-{
- ASSERT(isInGC());
- for (MarkingTask* task : m_markingTasks)
- task->willStartMarking(*this);
-}
-
-void ThreadState::invokePostMarkingTasks()
-{
- ASSERT(isInGC());
- for (size_t i = m_markingTasks.size(); i > 0; --i)
- m_markingTasks[i - 1]->didFinishMarking(*this);
-}
-
-void ThreadState::addMarkingTask(MarkingTask* task)
-{
- ASSERT(!isInGC());
- checkThread();
- m_markingTasks.append(task);
-}
-
-void ThreadState::removeMarkingTask(MarkingTask* task)
-{
- ASSERT(!isInGC());
- checkThread();
- size_t position = m_markingTasks.find(task);
- ASSERT(position != kNotFound);
- m_markingTasks.remove(position);
}
void ThreadState::prepareHeapForTermination()
@@ -1133,19 +1101,6 @@
}
}
- if (!m_zombies.isEmpty()) {
- TRACE_EVENT0("blink_gc", "Heap::visitObjects");
- // The following marking should not run in multiple threads because
- // it uses global resources such as s_markingStack.
- SafePointAwareMutexLocker locker(threadAttachMutex(), NoHeapPointersOnStack);
- GCState originalState = gcState();
- setGCState(GCRunning);
- invokePreMarkingTasks();
- Heap::visitObjects(this, m_zombies);
- invokePostMarkingTasks();
- setGCState(originalState);
- }
-
if (isMainThread())
ScriptForbiddenScope::exit();
}
@@ -1229,19 +1184,6 @@
m_preFinalizers.removeAll(deadObjects);
}
-void ThreadState::markAsZombie(void* object)
-{
- ASSERT(!isInGC());
- checkThread();
- ASSERT(!m_zombies.contains(object));
- m_zombies.add(object);
-}
-
-void ThreadState::purifyZombies()
-{
- m_zombies.clear();
-}
-
#if ENABLE(GC_PROFILING)
const GCInfo* ThreadState::findGCInfoFromAllThreads(Address address)
{
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698