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

Unified Diff: Source/platform/heap/Heap.h

Issue 1132053002: [WIP]Oilpan: checking for nearly-dead observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index d4ebf651d764e4f85b3a8ddff28bc1a8617ee1c5..bb0f7442aef35a60fa6a26f99aebe98a0c6538f7 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -876,19 +876,16 @@ public:
template<typename T>
static bool willObjectBeLazilySwept(const T* objectPointer)
{
- static_assert(IsGarbageCollectedType<T>::value, "only objects deriving from GarbageCollected can be used.");
#if ENABLE(OILPAN)
+ // Restricted to Oilpan.
+ static_assert(IsGarbageCollectedType<T>::value, "only objects deriving from GarbageCollected can be used.");
+#endif
BasePage* page = pageFromObject(objectPointer);
if (page->hasBeenSwept())
return false;
ASSERT(page->heap()->threadState()->isSweepingInProgress());
return !ObjectAliveTrait<T>::isHeapObjectAlive(s_markingVisitor, const_cast<T*>(objectPointer));
-#else
- // FIXME: remove when lazy sweeping is always on
- // (cf. ThreadState::preSweep()).
- return false;
-#endif
}
// Push a trace callback on the marking stack.
« Source/core/dom/ContextLifecycleNotifier.cpp ('K') | « Source/platform/LifecycleObserver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698