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 "bindings/core/v8/OnStackObjectChecker.h" | 5 #include "bindings/core/v8/OnStackObjectChecker.h" |
6 | 6 |
7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
8 #include "wtf/HashSet.h" | 8 #include "wtf/HashSet.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 #if ENABLE(ASSERT) | 12 #if ENABLE(ASSERT) |
| 13 OnStackObjectChecker::OnStackObjectChecker() |
| 14 { |
| 15 } |
| 16 |
13 OnStackObjectChecker::~OnStackObjectChecker() | 17 OnStackObjectChecker::~OnStackObjectChecker() |
14 { | 18 { |
15 // All dictionaries must be removed before the checker is destructed. | 19 // All dictionaries must be removed before the checker is destructed. |
16 ASSERT(m_dictionaries.isEmpty()); | 20 ASSERT(m_dictionaries.isEmpty()); |
17 } | 21 } |
18 | 22 |
19 void OnStackObjectChecker::add(Dictionary* dictionary) | 23 void OnStackObjectChecker::add(Dictionary* dictionary) |
20 { | 24 { |
21 m_dictionaries.add(dictionary); | 25 m_dictionaries.add(dictionary); |
22 } | 26 } |
23 | 27 |
24 void OnStackObjectChecker::remove(Dictionary* dictionary) | 28 void OnStackObjectChecker::remove(Dictionary* dictionary) |
25 { | 29 { |
26 m_dictionaries.remove(dictionary); | 30 m_dictionaries.remove(dictionary); |
27 } | 31 } |
28 #endif // ENABLE(ASSERT) | 32 #endif // ENABLE(ASSERT) |
29 | 33 |
30 } // namespace blink | 34 } // namespace blink |
OLD | NEW |