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

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

Issue 2645873002: Adjust placement of non-compaction checks. (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.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/Visitor.h
diff --git a/third_party/WebKit/Source/platform/heap/Visitor.h b/third_party/WebKit/Source/platform/heap/Visitor.h
index 7006d970b70811b3471da11998e0f88b2db6fc5b..0e16930bfb5b244ca4138ddf71d3cc1fc474ef4c 100644
--- a/third_party/WebKit/Source/platform/heap/Visitor.h
+++ b/third_party/WebKit/Source/platform/heap/Visitor.h
@@ -280,16 +280,18 @@ class VisitorHelper {
Derived::fromHelper(this)->registerWeakMembers(object, object, callback);
}
- template <typename T>
- void registerBackingStoreReference(T** slot) {
+ void registerBackingStoreReference(void* slot) {
+ if (getMarkingMode() != VisitorMarkingMode::GlobalMarkingWithCompaction)
+ return;
Derived::fromHelper(this)->registerMovingObjectReference(
reinterpret_cast<MovableReference*>(slot));
}
- template <typename T>
- void registerBackingStoreCallback(T* backingStore,
+ void registerBackingStoreCallback(void* backingStore,
MovingObjectCallback callback,
void* callbackData) {
+ if (getMarkingMode() != VisitorMarkingMode::GlobalMarkingWithCompaction)
+ return;
Derived::fromHelper(this)->registerMovingObjectCallback(
reinterpret_cast<MovableReference>(backingStore), callback,
callbackData);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698