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

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: Fix test case 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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/TraceTraits.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/WrapperVisitor.h
diff --git a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
index f85668a4fb69d1b32166534e3db7941cd72ec32a..6315aadb89d13c60f56a362c0c240233109df65d 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>::markWrapperNoTracing(this, traceable);
+ pushToMarkingDeque(TraceTrait<T>::traceMarkedWrapper,
TraceTrait<T>::heapObjectHeader, traceable);
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/TraceTraits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698