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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 typedef HashMap<int, DOMWrapperWorld*> WorldMap; | 78 typedef HashMap<int, DOMWrapperWorld*> WorldMap; |
79 static WorldMap& isolatedWorldMap() | 79 static WorldMap& isolatedWorldMap() |
80 { | 80 { |
81 ASSERT(isMainThread()); | 81 ASSERT(isMainThread()); |
82 DEFINE_STATIC_LOCAL(WorldMap, map, ()); | 82 DEFINE_STATIC_LOCAL(WorldMap, map, ()); |
83 return map; | 83 return map; |
84 } | 84 } |
85 | 85 |
86 void DOMWrapperWorld::getAllWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld> >&
worlds) | 86 void DOMWrapperWorld::allWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld> >& wo
rlds) |
87 { | 87 { |
88 ASSERT(isMainThread()); | 88 ASSERT(isMainThread()); |
89 worlds.append(mainWorld()); | 89 worlds.append(mainWorld()); |
90 WorldMap& isolatedWorlds = isolatedWorldMap(); | 90 WorldMap& isolatedWorlds = isolatedWorldMap(); |
91 for (WorldMap::iterator it = isolatedWorlds.begin(); it != isolatedWorlds.en
d(); ++it) | 91 for (WorldMap::iterator it = isolatedWorlds.begin(); it != isolatedWorlds.en
d(); ++it) |
92 worlds.append(it->value); | 92 worlds.append(it->value); |
93 } | 93 } |
94 | 94 |
95 DOMWrapperWorld::~DOMWrapperWorld() | 95 DOMWrapperWorld::~DOMWrapperWorld() |
96 { | 96 { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 DOMActivityLoggerMap::iterator it = loggers.find(worldId); | 221 DOMActivityLoggerMap::iterator it = loggers.find(worldId); |
222 return it == loggers.end() ? 0 : it->value.get(); | 222 return it == loggers.end() ? 0 : it->value.get(); |
223 } | 223 } |
224 | 224 |
225 bool DOMWrapperWorld::contextHasCorrectPrototype(v8::Handle<v8::Context> context
) | 225 bool DOMWrapperWorld::contextHasCorrectPrototype(v8::Handle<v8::Context> context
) |
226 { | 226 { |
227 return V8WindowShell::contextHasCorrectPrototype(context); | 227 return V8WindowShell::contextHasCorrectPrototype(context); |
228 } | 228 } |
229 | 229 |
230 } // namespace WebCore | 230 } // namespace WebCore |
OLD | NEW |