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 "config.h" | 5 #include "config.h" |
6 #include "bindings/core/v8/V8DOMActivityLogger.h" | 6 #include "bindings/core/v8/V8DOMActivityLogger.h" |
7 | 7 |
8 #include "bindings/core/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
9 #include "platform/weborigin/KURL.h" | 9 #include "platform/weborigin/KURL.h" |
10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
11 #include "wtf/MainThread.h" | 11 #include "wtf/MainThread.h" |
12 #include "wtf/text/StringHash.h" | 12 #include "wtf/text/StringHash.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 typedef HashMap<String, OwnPtr<V8DOMActivityLogger> > DOMActivityLoggerMapForMai
nWorld; | 16 typedef HashMap<String, OwnPtr<V8DOMActivityLogger>> DOMActivityLoggerMapForMain
World; |
17 typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::Unsign
edWithZeroKeyHashTraits<int> > DOMActivityLoggerMapForIsolatedWorld; | 17 typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::Unsign
edWithZeroKeyHashTraits<int>> DOMActivityLoggerMapForIsolatedWorld; |
18 | 18 |
19 static DOMActivityLoggerMapForMainWorld& domActivityLoggersForMainWorld() | 19 static DOMActivityLoggerMapForMainWorld& domActivityLoggersForMainWorld() |
20 { | 20 { |
21 ASSERT(isMainThread()); | 21 ASSERT(isMainThread()); |
22 DEFINE_STATIC_LOCAL(DOMActivityLoggerMapForMainWorld, map, ()); | 22 DEFINE_STATIC_LOCAL(DOMActivityLoggerMapForMainWorld, map, ()); |
23 return map; | 23 return map; |
24 } | 24 } |
25 | 25 |
26 static DOMActivityLoggerMapForIsolatedWorld& domActivityLoggersForIsolatedWorld(
) | 26 static DOMActivityLoggerMapForIsolatedWorld& domActivityLoggersForIsolatedWorld(
) |
27 { | 27 { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return 0; | 103 return 0; |
104 | 104 |
105 V8PerContextData* contextData = scriptState->perContextData(); | 105 V8PerContextData* contextData = scriptState->perContextData(); |
106 if (!contextData) | 106 if (!contextData) |
107 return 0; | 107 return 0; |
108 | 108 |
109 return contextData->activityLogger(); | 109 return contextData->activityLogger(); |
110 } | 110 } |
111 | 111 |
112 } // namespace blink | 112 } // namespace blink |
OLD | NEW |