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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentOrderedMap.h

Issue 1532103002: Better handling of DocumentOrderedMap same-ID lookups during tree removals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spelling Created 5 years 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/core/dom/DocumentOrderedMap.h
diff --git a/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h b/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h
index e4c311633288140eae0884d907f5798a293950a7..5a6f7dc92d0283b23606b2183fe4c0126c322bb7 100644
--- a/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h
+++ b/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h
@@ -62,7 +62,13 @@ public:
DECLARE_TRACE();
+#if ENABLE(ASSERT)
+ void willBeRemovingId(const AtomicString*);
esprehn 2015/12/18 00:42:26 willRemoveId() no "Be"
sof 2015/12/18 07:31:53 Renamed to willRemoveId().
+#endif
+
private:
+ DocumentOrderedMap();
esprehn 2015/12/18 00:42:26 we should declare the destructor too
sof 2015/12/18 07:31:53 Done, but see below.
+
template<bool keyMatches(const AtomicString&, const Element&)>
Element* get(const AtomicString&, const TreeScope*) const;
@@ -84,6 +90,9 @@ private:
using Map = WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<MapEntry>>;
mutable Map m_map;
+#if ENABLE(ASSERT)
+ const AtomicString* m_removingId;
tkent 2015/12/18 00:30:57 Can you make this |AtomicString| and check AtomicS
esprehn 2015/12/18 00:42:26 +1
sof 2015/12/18 07:31:53 Done that; slight downside with such a design is i
+#endif
};
inline bool DocumentOrderedMap::contains(const AtomicString& id) const

Powered by Google App Engine
This is Rietveld 408576698