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

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

Issue 1555653002: Handle some failing DocumentOrderedMap ID lookups across tree removals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test 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 0877b713598c760ce52f3e8cc0a5a2d1a707a437..dcb1683fe210de8b5b7bf153de249c4f204ed1ef 100644
--- a/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h
+++ b/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h
@@ -44,11 +44,11 @@ namespace blink {
class Element;
class TreeScope;
-class DocumentOrderedMap : public NoBaseWillBeGarbageCollectedFinalized<DocumentOrderedMap> {
+class DocumentOrderedMap : public NoBaseWillBeGarbageCollected<DocumentOrderedMap> {
USING_FAST_MALLOC_WILL_BE_REMOVED(DocumentOrderedMap);
+ DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentOrderedMap);
public:
static PassOwnPtrWillBeRawPtr<DocumentOrderedMap> create();
- ~DocumentOrderedMap();
void add(const AtomicString&, Element*);
void remove(const AtomicString&, Element*);
@@ -65,7 +65,8 @@ public:
DECLARE_TRACE();
#if ENABLE(ASSERT)
- void willRemoveId(const AtomicString&);
+ void enterTreeRemoveScope();
esprehn 2016/01/05 07:48:33 put the class here, add an #elseif and define the
sof 2016/01/05 12:37:18 Done.
+ void leaveTreeRemoveScope();
#endif
private:
@@ -93,7 +94,7 @@ private:
mutable Map m_map;
#if ENABLE(ASSERT)
- AtomicString m_removingId;
+ int m_treeRemovalScopeLevel = 0;
esprehn 2016/01/05 07:48:33 I would just use a static int
sof 2016/01/05 12:37:18 Done.
#endif
};

Powered by Google App Engine
This is Rietveld 408576698