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 #ifndef NoEventDispatchAssertion_h | 5 #ifndef NoEventDispatchAssertion_h |
6 #define NoEventDispatchAssertion_h | 6 #define NoEventDispatchAssertion_h |
7 | 7 |
8 #include "wtf/MainThread.h" | 8 #include "wtf/MainThread.h" |
9 #include "wtf/TemporaryChange.h" | 9 #include "wtf/TemporaryChange.h" |
10 | 10 |
11 namespace WebCore { | 11 namespace WebCore { |
12 | 12 |
13 #ifndef NDEBUG | 13 #if ENABLE(ASSERT) |
14 | 14 |
15 class NoEventDispatchAssertion { | 15 class NoEventDispatchAssertion { |
16 public: | 16 public: |
17 NoEventDispatchAssertion() | 17 NoEventDispatchAssertion() |
18 { | 18 { |
19 if (!isMainThread()) | 19 if (!isMainThread()) |
20 return; | 20 return; |
21 ++s_count; | 21 ++s_count; |
22 } | 22 } |
23 | 23 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 class NoEventDispatchAssertion { | 62 class NoEventDispatchAssertion { |
63 public: | 63 public: |
64 NoEventDispatchAssertion() { } | 64 NoEventDispatchAssertion() { } |
65 | 65 |
66 class AllowSVGImageEvents { | 66 class AllowSVGImageEvents { |
67 public: | 67 public: |
68 AllowSVGImageEvents() { } | 68 AllowSVGImageEvents() { } |
69 }; | 69 }; |
70 }; | 70 }; |
71 | 71 |
72 #endif // NDEBUG | 72 #endif // ENABLE(ASSERT) |
73 | 73 |
74 } // namespace WebCore | 74 } // namespace WebCore |
75 | 75 |
76 #endif // NoEventDispatchAssertion_h | 76 #endif // NoEventDispatchAssertion_h |
OLD | NEW |