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

Unified Diff: Source/platform/heap/Heap.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/Heap.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index dfe3e0e773fac5a0817483677da6f0fd45d8706c..67394e8c468cd16e49e105e5db9f3a389555d42d 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -1946,8 +1946,7 @@
enum MarkingMode {
GlobalMarking,
- ThreadLocalMarking, // This works only if the thread is terminating.
- ZombieMarking,
+ ThreadLocalMarking,
};
template <MarkingMode Mode>
@@ -2126,21 +2125,15 @@
inline bool shouldMarkObject(const void* objectPointer)
{
- if (Mode == GlobalMarking)
+ if (Mode != ThreadLocalMarking)
return true;
- if (Mode == ThreadLocalMarking) {
- BasePage* page = pageFromObject(objectPointer);
- ASSERT(!page->orphaned());
- // When doing a thread local GC, the marker checks if the object
- // resides in another thread's heap. If it does, the object should
- // not be marked & traced.
- return page->terminating();
- }
-
- // ZombieMarking case. Any objects must not be owned by other threads.
- ASSERT(ThreadState::current()->findPageFromAddress(objectPointer));
- return true;
+ BasePage* page = pageFromObject(objectPointer);
+ ASSERT(!page->orphaned());
+ // When doing a thread local GC, the marker checks if
+ // the object resides in another thread's heap. If it
+ // does, the object should not be marked & traced.
+ return page->terminating();
}
#if ENABLE(ASSERT)
@@ -2483,17 +2476,6 @@
ScriptForbiddenScope::exit();
}
-void Heap::visitObjects(ThreadState* state, const HashSet<void*>& objects)
-{
- MarkingVisitor<ZombieMarking> visitor;
- ThreadState::NoAllocationScope noAllocationScope(state);
- for (void* address : objects)
- checkAndMarkPointer(&visitor, reinterpret_cast<Address>(address));
- processMarkingStack(&visitor);
- postMarkingProcessing(&visitor);
- globalWeakProcessing(&visitor);
-}
-
void Heap::collectGarbageForTerminatingThread(ThreadState* state)
{
// We explicitly do not enter a safepoint while doing thread specific
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698