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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.cpp

Issue 1922493002: Revert of CrossThreadPersistentRegion will only trace objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
Index: third_party/WebKit/Source/platform/heap/PersistentNode.cpp
diff --git a/third_party/WebKit/Source/platform/heap/PersistentNode.cpp b/third_party/WebKit/Source/platform/heap/PersistentNode.cpp
index 563f0fd7844b861ff5180cb20983623f600bd929..df3cfa7cc5aa87459c4fd3d9410e731d32b2c9ef 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.cpp
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.cpp
@@ -73,7 +73,7 @@ void PersistentRegion::releasePersistentNode(PersistentNode* persistentNode, Thr
// a PersistentNodeSlot that contains only freed PersistentNodes,
// we delete the PersistentNodeSlot. This function rebuilds the free
// list of PersistentNodes.
-void PersistentRegion::tracePersistentNodes(Visitor* visitor, ShouldTraceCallback shouldTrace)
+void PersistentRegion::tracePersistentNodes(Visitor* visitor)
{
size_t debugMarkedObjectSize = ProcessHeap::totalMarkedObjectSize();
base::debug::Alias(&debugMarkedObjectSize);
@@ -95,10 +95,8 @@ void PersistentRegion::tracePersistentNodes(Visitor* visitor, ShouldTraceCallbac
freeListNext = node;
++freeCount;
} else {
- ++persistentCount;
- if (!shouldTrace(visitor, node))
- continue;
node->tracePersistentNode(visitor);
+ ++persistentCount;
debugMarkedObjectSize = ProcessHeap::totalMarkedObjectSize();
}
}
@@ -121,14 +119,12 @@ void PersistentRegion::tracePersistentNodes(Visitor* visitor, ShouldTraceCallbac
ASSERT(persistentCount == m_persistentCount);
}
-bool CrossThreadPersistentRegion::shouldTracePersistentNode(Visitor* visitor, PersistentNode* node)
-{
- CrossThreadPersistent<DummyGCBase>* persistent = reinterpret_cast<CrossThreadPersistent<DummyGCBase>*>(node->self());
- ASSERT(persistent);
- Address rawObject = reinterpret_cast<Address>(persistent->get());
- if (!rawObject)
- return false;
- return &visitor->heap() == &ThreadState::fromObject(rawObject)->heap();
+
+namespace {
+class GCObject final : public GarbageCollected<GCObject> {
+public:
+ DEFINE_INLINE_TRACE() { }
+};
}
void CrossThreadPersistentRegion::prepareForThreadStateTermination(ThreadState* threadState)
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PersistentNode.h ('k') | third_party/WebKit/Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698