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

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: Rebase again. 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
Index: Source/core/dom/DocumentMarkerController.cpp
diff --git a/Source/core/dom/DocumentMarkerController.cpp b/Source/core/dom/DocumentMarkerController.cpp
index 1d855e8c2eaa7a52609ba878fe598e4b89d458ce..4284af42133cbb2f113a59cd0c290ec661b06153 100644
--- a/Source/core/dom/DocumentMarkerController.cpp
+++ b/Source/core/dom/DocumentMarkerController.cpp
@@ -360,6 +360,17 @@ void DocumentMarkerController::removeMarkers(Node* node, unsigned startOffset, i
node->renderer()->repaint();
}
+void DocumentMarkerController::clearWeakMembers(Visitor* visitor)
haraken 2014/04/24 04:18:43 Shall we add a FIXME that MarkerMap should use a h
Mads Ager (chromium) 2014/04/24 10:57:36 Yes, done.
+{
+ 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))

Powered by Google App Engine
This is Rietveld 408576698