OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 else | 216 else |
217 isolatedWorldContentSecurityPolicies().remove(worldID); | 217 isolatedWorldContentSecurityPolicies().remove(worldID); |
218 } | 218 } |
219 | 219 |
220 void DOMWrapperWorld::clearIsolatedWorldContentSecurityPolicy(int worldID) | 220 void DOMWrapperWorld::clearIsolatedWorldContentSecurityPolicy(int worldID) |
221 { | 221 { |
222 ASSERT(DOMWrapperWorld::isIsolatedWorldId(worldID)); | 222 ASSERT(DOMWrapperWorld::isIsolatedWorldId(worldID)); |
223 isolatedWorldContentSecurityPolicies().remove(worldID); | 223 isolatedWorldContentSecurityPolicies().remove(worldID); |
224 } | 224 } |
225 | 225 |
226 typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::Unsign
edWithZeroKeyHashTraits<int> > DOMActivityLoggerMap; | 226 typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::Unsign
edWithZeroKeyHashTraits<int> > DOMActivityLoggerMap; |
227 static DOMActivityLoggerMap& domActivityLoggers() | 227 static DOMActivityLoggerMap& domActivityLoggers() |
228 { | 228 { |
229 ASSERT(isMainThread()); | 229 ASSERT(isMainThread()); |
230 DEFINE_STATIC_LOCAL(DOMActivityLoggerMap, map, ()); | 230 DEFINE_STATIC_LOCAL(DOMActivityLoggerMap, map, ()); |
231 return map; | 231 return map; |
232 } | 232 } |
233 | 233 |
234 void DOMWrapperWorld::setActivityLogger(int worldId, PassOwnPtr<V8DOMActivityLog
ger> logger) | 234 void DOMWrapperWorld::setActivityLogger(int worldId, PassOwnPtr<V8DOMActivityLog
ger> logger) |
235 { | 235 { |
236 domActivityLoggers().set(worldId, logger); | 236 domActivityLoggers().set(worldId, logger); |
237 } | 237 } |
238 | 238 |
239 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) | 239 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) |
240 { | 240 { |
241 DOMActivityLoggerMap& loggers = domActivityLoggers(); | 241 DOMActivityLoggerMap& loggers = domActivityLoggers(); |
242 DOMActivityLoggerMap::iterator it = loggers.find(worldId); | 242 DOMActivityLoggerMap::iterator it = loggers.find(worldId); |
243 return it == loggers.end() ? 0 : it->value.get(); | 243 return it == loggers.end() ? 0 : it->value.get(); |
244 } | 244 } |
245 | 245 |
246 } // namespace WebCore | 246 } // namespace WebCore |
OLD | NEW |