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

Side by Side Diff: third_party/WebKit/Source/platform/InstanceCounters.h

Issue 2606633002: encrypted-media tests should not count # of SuspendableObjects (Closed)
Patch Set: temp Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "wtf/Allocator.h" 35 #include "wtf/Allocator.h"
36 #include "wtf/Atomics.h" 36 #include "wtf/Atomics.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class InstanceCounters { 40 class InstanceCounters {
41 STATIC_ONLY(InstanceCounters); 41 STATIC_ONLY(InstanceCounters);
42 42
43 public: 43 public:
44 enum CounterType { 44 enum CounterType {
45 SuspendableObjectCounter,
46 AudioHandlerCounter, 45 AudioHandlerCounter,
47 DocumentCounter, 46 DocumentCounter,
48 FrameCounter, 47 FrameCounter,
49 JSEventListenerCounter, 48 JSEventListenerCounter,
50 LayoutObjectCounter, 49 LayoutObjectCounter,
50 MediaKeySessionCounter,
51 MediaKeysCounter,
51 NodeCounter, 52 NodeCounter,
52 ResourceCounter, 53 ResourceCounter,
53 ScriptPromiseCounter, 54 ScriptPromiseCounter,
55 SuspendableObjectCounter,
54 V8PerContextDataCounter, 56 V8PerContextDataCounter,
55 WorkerGlobalScopeCounter, 57 WorkerGlobalScopeCounter,
56 58
57 // This value must be the last. 59 // This value must be the last.
58 CounterTypeLength, 60 CounterTypeLength,
59 }; 61 };
60 62
61 static inline void incrementCounter(CounterType type) { 63 static inline void incrementCounter(CounterType type) {
62 DCHECK_NE(type, NodeCounter); 64 DCHECK_NE(type, NodeCounter);
63 atomicIncrement(&s_counters[type]); 65 atomicIncrement(&s_counters[type]);
(...skipping 17 matching lines...) Expand all
81 PLATFORM_EXPORT static int counterValue(CounterType); 83 PLATFORM_EXPORT static int counterValue(CounterType);
82 84
83 private: 85 private:
84 PLATFORM_EXPORT static int s_counters[CounterTypeLength]; 86 PLATFORM_EXPORT static int s_counters[CounterTypeLength];
85 PLATFORM_EXPORT static int s_nodeCounter; 87 PLATFORM_EXPORT static int s_nodeCounter;
86 }; 88 };
87 89
88 } // namespace blink 90 } // namespace blink
89 91
90 #endif // !defined(InstanceCounters_h) 92 #endif // !defined(InstanceCounters_h)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698