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

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

Issue 2652923002: Devirtualize Visitor and remove inline visitor specialization. (Closed)
Patch Set: rebased 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/Handle.h ('k') | third_party/WebKit/Source/platform/heap/Heap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/Heap.h
diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
index c494896d1b5fdc554e716e892a6a87744a4a3729..fd9efc02c1183ba3f30370720d6775e87527093d 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.h
+++ b/third_party/WebKit/Source/platform/heap/Heap.h
@@ -435,6 +435,11 @@ class PLATFORM_EXPORT ThreadHeap {
// Conservatively checks whether an address is a pointer in any of the
// thread heaps. If so marks the object pointed to as live.
Address checkAndMarkPointer(Visitor*, Address);
+#if DCHECK_IS_ON()
+ Address checkAndMarkPointer(Visitor*,
+ Address,
+ MarkedPointerCallbackForTesting);
+#endif
size_t objectPayloadSizeForTesting();
@@ -692,9 +697,8 @@ Address ThreadHeap::reallocate(void* previous, size_t size) {
return address;
}
-template <typename Derived>
template <typename T>
-void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) {
+void Visitor::handleWeakCell(Visitor* self, void* object) {
T** cell = reinterpret_cast<T**>(object);
if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell))
*cell = nullptr;
@@ -702,4 +706,6 @@ void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) {
} // namespace blink
+#include "platform/heap/VisitorImpl.h"
+
#endif // Heap_h
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Handle.h ('k') | third_party/WebKit/Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698