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

Unified Diff: Source/core/dom/DocumentMarkerController.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 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
« no previous file with comments | « Source/core/dom/DocumentMarkerController.h ('k') | Source/core/dom/DocumentTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentMarkerController.cpp
diff --git a/Source/core/dom/DocumentMarkerController.cpp b/Source/core/dom/DocumentMarkerController.cpp
index 1d855e8c2eaa7a52609ba878fe598e4b89d458ce..034d3febfee6728505c3a1712df5d88aa2cfb763 100644
--- a/Source/core/dom/DocumentMarkerController.cpp
+++ b/Source/core/dom/DocumentMarkerController.cpp
@@ -360,6 +360,19 @@ void DocumentMarkerController::removeMarkers(Node* node, unsigned startOffset, i
node->renderer()->repaint();
}
+// FIXME: Oilpan: Move DocumentMarkerController to the Oilpan heap and make
+// the MarkerMap a weak collection instead of this explicit weak processing.
+void DocumentMarkerController::clearWeakMembers(Visitor* visitor)
+{
+ Vector<const Node*> deadNodes;
+ for (MarkerMap::iterator it = m_markers.begin(); it != m_markers.end(); ++it) {
+ if (!visitor->isAlive(it->key))
+ deadNodes.append(it->key);
+ }
+ for (unsigned i = 0; i < deadNodes.size(); ++i)
+ removeMarkers(const_cast<Node*>(deadNodes[i]));
+}
+
DocumentMarker* DocumentMarkerController::markerContainingPoint(const LayoutPoint& point, DocumentMarker::MarkerType markerType)
{
if (!possiblyHasMarkers(markerType))
« no previous file with comments | « Source/core/dom/DocumentMarkerController.h ('k') | Source/core/dom/DocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698