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

Unified Diff: third_party/WebKit/Source/platform/heap/WrapperVisitor.h

Issue 2585433003: [wrapper-tracing] Reduce marking overhead: Tri-color marking without 3 colors (Closed)
Patch Set: Remove profiling prints Created 4 years 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: third_party/WebKit/Source/platform/heap/WrapperVisitor.h
diff --git a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
index f85668a4fb69d1b32166534e3db7941cd72ec32a..0eaf1c753abb0bd77b900f4bb852f21ceaff5d33 100644
--- a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
+++ b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
@@ -93,10 +93,9 @@ class PLATFORM_EXPORT WrapperVisitor {
template <typename T>
void traceWrappers(const T* traceable) const {
static_assert(sizeof(T), "T must be fully defined");
- // Ideally, we'd assert that we can cast to TraceWrapperBase here.
- static_assert(
- IsGarbageCollectedType<T>::value,
- "Only garbage collected objects can be used in traceWrappers().");
+ static_assert(CanTraceWrappers<T>::value,
+ "T should be able to trace wrappers. See "
+ "dispatchTraceWrappers in WrapperVisitor.h");
if (!traceable) {
return;
@@ -106,7 +105,8 @@ class PLATFORM_EXPORT WrapperVisitor {
return;
}
- pushToMarkingDeque(TraceTrait<T>::markWrapper,
+ TraceTrait<T>::markWrapperHeaderOnly(this, traceable);
+ pushToMarkingDeque(TraceTrait<T>::finishMarkAndTraceMarkedWrapper,
TraceTrait<T>::heapObjectHeader, traceable);
}

Powered by Google App Engine
This is Rietveld 408576698