diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-16 11:45:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-17 08:59:23 +0000 |
commit | 552906b0f222c5d5dd11b9fd73829d510980461a (patch) | |
tree | 3a11e6ed0538a81dd83b20cf3a4783e297f26d91 /chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h | |
parent | 1b05827804eaf047779b597718c03e7d38344261 (diff) | |
download | qtwebengine-chromium-552906b0f222c5d5dd11b9fd73829d510980461a.tar.gz |
BASELINE: Update Chromium to 83.0.4103.122
Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h b/chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h index 09cb934340b..375ba7f6d5c 100644 --- a/chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h +++ b/chromium/third_party/blink/renderer/core/dom/node_lists_node_data.h @@ -39,20 +39,18 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { public: ChildNodeList* GetChildNodeList(ContainerNode& node) { DCHECK(!child_node_list_ || node == child_node_list_->VirtualOwnerNode()); - return ToChildNodeList(child_node_list_); + return To<ChildNodeList>(child_node_list_.Get()); } ChildNodeList* EnsureChildNodeList(ContainerNode& node) { - DCHECK(ThreadState::Current()->IsGCForbidden()); if (child_node_list_) - return ToChildNodeList(child_node_list_); + return To<ChildNodeList>(child_node_list_.Get()); auto* list = MakeGarbageCollected<ChildNodeList>(node); child_node_list_ = list; return list; } EmptyNodeList* EnsureEmptyChildNodeList(Node& node) { - DCHECK(ThreadState::Current()->IsGCForbidden()); if (child_node_list_) return To<EmptyNodeList>(child_node_list_.Get()); auto* list = MakeGarbageCollected<EmptyNodeList>(node); @@ -88,7 +86,6 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { T* AddCache(ContainerNode& node, CollectionType collection_type, const AtomicString& name) { - DCHECK(ThreadState::Current()->IsGCForbidden()); NodeListAtomicNameCacheMap::AddResult result = atomic_name_caches_.insert( std::make_pair(collection_type, name), nullptr); if (!result.is_new_entry) { @@ -102,7 +99,6 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { template <typename T> T* AddCache(ContainerNode& node, CollectionType collection_type) { - DCHECK(ThreadState::Current()->IsGCForbidden()); NodeListAtomicNameCacheMap::AddResult result = atomic_name_caches_.insert( NamedNodeListKey(collection_type, CSSSelector::UniversalSelectorAtom()), nullptr); @@ -124,15 +120,14 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { TagCollectionNS* AddCache(ContainerNode& node, const AtomicString& namespace_uri, const AtomicString& local_name) { - DCHECK(ThreadState::Current()->IsGCForbidden()); QualifiedName name(g_null_atom, local_name, namespace_uri); TagCollectionNSCache::AddResult result = tag_collection_ns_caches_.insert(name, nullptr); if (!result.is_new_entry) return result.stored_value->value; - TagCollectionNS* list = - TagCollectionNS::Create(node, namespace_uri, local_name); + auto* list = MakeGarbageCollected<TagCollectionNS>( + node, kTagCollectionNSType, namespace_uri, local_name); result.stored_value->value = list; return list; } @@ -183,7 +178,6 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { template <typename Collection> inline Collection* ContainerNode::EnsureCachedCollection(CollectionType type) { - ThreadState::MainThreadGCForbiddenScope gc_forbidden; return EnsureNodeLists().AddCache<Collection>(*this, type); } @@ -191,7 +185,6 @@ template <typename Collection> inline Collection* ContainerNode::EnsureCachedCollection( CollectionType type, const AtomicString& name) { - ThreadState::MainThreadGCForbiddenScope gc_forbidden; return EnsureNodeLists().AddCache<Collection>(*this, type, name); } @@ -201,7 +194,6 @@ inline Collection* ContainerNode::EnsureCachedCollection( const AtomicString& namespace_uri, const AtomicString& local_name) { DCHECK_EQ(type, kTagCollectionNSType); - ThreadState::MainThreadGCForbiddenScope gc_forbidden; return EnsureNodeLists().AddCache(*this, namespace_uri, local_name); } |