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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/DistributedNodes.cpp

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 20 matching lines...) Expand all
31 namespace blink { 31 namespace blink {
32 32
33 void DistributedNodes::swap(DistributedNodes& other) 33 void DistributedNodes::swap(DistributedNodes& other)
34 { 34 {
35 m_nodes.swap(other.m_nodes); 35 m_nodes.swap(other.m_nodes);
36 m_indices.swap(other.m_indices); 36 m_indices.swap(other.m_indices);
37 } 37 }
38 38
39 void DistributedNodes::append(RawPtr<Node> node) 39 void DistributedNodes::append(RawPtr<Node> node)
40 { 40 {
41 ASSERT(node); 41 DCHECK(node);
42 ASSERT(!node->isSlotOrActiveInsertionPoint()); 42 DCHECK(!node->isSlotOrActiveInsertionPoint());
43 size_t size = m_nodes.size(); 43 size_t size = m_nodes.size();
44 m_indices.set(node.get(), size); 44 m_indices.set(node.get(), size);
45 m_nodes.append(node); 45 m_nodes.append(node);
46 } 46 }
47 47
48 size_t DistributedNodes::find(const Node* node) const 48 size_t DistributedNodes::find(const Node* node) const
49 { 49 {
50 HeapHashMap<Member<const Node>, size_t>::const_iterator it = m_indices.find( node); 50 HeapHashMap<Member<const Node>, size_t>::const_iterator it = m_indices.find( node);
51 if (it == m_indices.end()) 51 if (it == m_indices.end())
52 return kNotFound; 52 return kNotFound;
(...skipping 17 matching lines...) Expand all
70 return at(index - 1).get(); 70 return at(index - 1).get();
71 } 71 }
72 72
73 DEFINE_TRACE(DistributedNodes) 73 DEFINE_TRACE(DistributedNodes)
74 { 74 {
75 visitor->trace(m_nodes); 75 visitor->trace(m_nodes);
76 visitor->trace(m_indices); 76 visitor->trace(m_indices);
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698