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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/OnStackObjectChecker.cpp

Issue 1999343002: Unify and provide one IsGarbageCollectedType<T> implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 4 years, 7 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 // 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698