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