| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/ChildFrameDisconnector.h" | 5 #include "core/dom/ChildFrameDisconnector.h" |
| 6 | 6 |
| 7 #include "core/dom/shadow/ElementShadow.h" | 7 #include "core/dom/shadow/ElementShadow.h" |
| 8 #include "core/dom/shadow/ShadowRoot.h" | 8 #include "core/dom/shadow/ShadowRoot.h" |
| 9 #include "core/html/HTMLFrameOwnerElement.h" | 9 #include "core/html/HTMLFrameOwnerElement.h" |
| 10 #include "wtf/Assertions.h" | 10 #include "platform/wtf/Assertions.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 #if DCHECK_IS_ON() | 14 #if DCHECK_IS_ON() |
| 15 static unsigned CheckConnectedSubframeCountIsConsistent(Node&); | 15 static unsigned CheckConnectedSubframeCountIsConsistent(Node&); |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 void ChildFrameDisconnector::Disconnect(DisconnectPolicy policy) { | 18 void ChildFrameDisconnector::Disconnect(DisconnectPolicy policy) { |
| 19 #if DCHECK_IS_ON() | 19 #if DCHECK_IS_ON() |
| 20 CheckConnectedSubframeCountIsConsistent(Root()); | 20 CheckConnectedSubframeCountIsConsistent(Root()); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // If we overcount it's safe, but not optimal because it means we'll traverse | 94 // If we overcount it's safe, but not optimal because it means we'll traverse |
| 95 // through the document in ChildFrameDisconnector looking for frames that have | 95 // through the document in ChildFrameDisconnector looking for frames that have |
| 96 // already been disconnected. | 96 // already been disconnected. |
| 97 DCHECK_EQ(node.ConnectedSubframeCount(), count); | 97 DCHECK_EQ(node.ConnectedSubframeCount(), count); |
| 98 | 98 |
| 99 return count; | 99 return count; |
| 100 } | 100 } |
| 101 #endif | 101 #endif |
| 102 | 102 |
| 103 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |