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

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

Issue 2617393004: Remove marking visitors' shouldMarkObject(). (Closed)
Patch Set: reinstate same-thread dcheck for ensureMarked() 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/MarkingVisitor.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/MarkingVisitorImpl.h
diff --git a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h
index 22c5cbd0900f82fb1bd0f71293c41dabc645cde5..078dc66082643d2cf3236e76957a3e89897a59e7 100644
--- a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h
+++ b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h
@@ -22,8 +22,6 @@ class MarkingVisitorImpl {
TraceCallback callback) {
ASSERT(header);
ASSERT(objectPointer);
- if (!toDerived()->shouldMarkObject(objectPointer))
- return;
// If you hit this ASSERT, it means that there is a dangling pointer
// from a live thread heap to a dead thread heap. We must eliminate
@@ -106,19 +104,15 @@ class MarkingVisitorImpl {
inline bool ensureMarked(const void* objectPointer) {
if (!objectPointer)
return false;
- if (!toDerived()->shouldMarkObject(objectPointer))
+
+ HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectPointer);
+ if (header->isMarked())
return false;
#if ENABLE(ASSERT)
- if (HeapObjectHeader::fromPayload(objectPointer)->isMarked())
- return false;
-
toDerived()->markNoTracing(objectPointer);
#else
// Inline what the above markNoTracing() call expands to,
- // so as to make sure that we do get all the benefits.
- HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectPointer);
- if (header->isMarked())
- return false;
+ // so as to make sure that we do get all the benefits (asserts excepted.)
header->mark();
#endif
return true;
« no previous file with comments | « third_party/WebKit/Source/platform/heap/MarkingVisitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698