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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 world = adoptRef(new DOMWrapperWorld(worldId, extensionGroup)); | 158 world = adoptRef(new DOMWrapperWorld(worldId, extensionGroup)); |
159 result.iterator->value = world.get(); | 159 result.iterator->value = world.get(); |
160 isolatedWorldCount++; | 160 isolatedWorldCount++; |
161 ASSERT(map.size() == isolatedWorldCount); | 161 ASSERT(map.size() == isolatedWorldCount); |
162 | 162 |
163 return world.release(); | 163 return world.release(); |
164 } | 164 } |
165 | 165 |
166 v8::Handle<v8::Context> DOMWrapperWorld::context(ScriptController* controller) | 166 v8::Handle<v8::Context> DOMWrapperWorld::context(ScriptController& controller) |
167 { | 167 { |
168 return controller->windowShell(this)->context(); | 168 return controller.windowShell(this)->context(); |
169 } | 169 } |
170 | 170 |
171 typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap; | 171 typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap; |
172 static IsolatedWorldSecurityOriginMap& isolatedWorldSecurityOrigins() | 172 static IsolatedWorldSecurityOriginMap& isolatedWorldSecurityOrigins() |
173 { | 173 { |
174 ASSERT(isMainThread()); | 174 ASSERT(isMainThread()); |
175 DEFINE_STATIC_LOCAL(IsolatedWorldSecurityOriginMap, map, ()); | 175 DEFINE_STATIC_LOCAL(IsolatedWorldSecurityOriginMap, map, ()); |
176 return map; | 176 return map; |
177 } | 177 } |
178 | 178 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 244 } |
245 | 245 |
246 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) | 246 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) |
247 { | 247 { |
248 DOMActivityLoggerMap& loggers = domActivityLoggers(); | 248 DOMActivityLoggerMap& loggers = domActivityLoggers(); |
249 DOMActivityLoggerMap::iterator it = loggers.find(worldId); | 249 DOMActivityLoggerMap::iterator it = loggers.find(worldId); |
250 return it == loggers.end() ? 0 : it->value.get(); | 250 return it == loggers.end() ? 0 : it->value.get(); |
251 } | 251 } |
252 | 252 |
253 } // namespace WebCore | 253 } // namespace WebCore |
OLD | NEW |