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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 isolatedWorldCount--; | 120 isolatedWorldCount--; |
121 ASSERT(map.size() == isolatedWorldCount); | 121 ASSERT(map.size() == isolatedWorldCount); |
122 } | 122 } |
123 | 123 |
124 PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(int worldId, in
t extensionGroup) | 124 PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(int worldId, in
t extensionGroup) |
125 { | 125 { |
126 ASSERT(isIsolatedWorldId(worldId)); | 126 ASSERT(isIsolatedWorldId(worldId)); |
127 | 127 |
128 WorldMap& map = isolatedWorldMap(); | 128 WorldMap& map = isolatedWorldMap(); |
129 WorldMap::AddResult result = map.add(worldId, 0); | 129 WorldMap::AddResult result = map.add(worldId, 0); |
130 RefPtr<DOMWrapperWorld> world = result.iterator->value; | 130 RefPtr<DOMWrapperWorld> world = result.storedValue->value; |
131 if (world) { | 131 if (world) { |
132 ASSERT(world->worldId() == worldId); | 132 ASSERT(world->worldId() == worldId); |
133 ASSERT(world->extensionGroup() == extensionGroup); | 133 ASSERT(world->extensionGroup() == extensionGroup); |
134 return world.release(); | 134 return world.release(); |
135 } | 135 } |
136 | 136 |
137 world = DOMWrapperWorld::create(worldId, extensionGroup); | 137 world = DOMWrapperWorld::create(worldId, extensionGroup); |
138 result.iterator->value = world.get(); | 138 result.storedValue->value = world.get(); |
139 isolatedWorldCount++; | 139 isolatedWorldCount++; |
140 ASSERT(map.size() == isolatedWorldCount); | 140 ASSERT(map.size() == isolatedWorldCount); |
141 | 141 |
142 return world.release(); | 142 return world.release(); |
143 } | 143 } |
144 | 144 |
145 v8::Handle<v8::Context> DOMWrapperWorld::context(ScriptController& controller) | 145 v8::Handle<v8::Context> DOMWrapperWorld::context(ScriptController& controller) |
146 { | 146 { |
147 return controller.windowShell(this)->context(); | 147 return controller.windowShell(this)->context(); |
148 } | 148 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 DOMActivityLoggerMap::iterator it = loggers.find(worldId); | 228 DOMActivityLoggerMap::iterator it = loggers.find(worldId); |
229 return it == loggers.end() ? 0 : it->value.get(); | 229 return it == loggers.end() ? 0 : it->value.get(); |
230 } | 230 } |
231 | 231 |
232 bool DOMWrapperWorld::contextHasCorrectPrototype(v8::Handle<v8::Context> context
) | 232 bool DOMWrapperWorld::contextHasCorrectPrototype(v8::Handle<v8::Context> context
) |
233 { | 233 { |
234 return V8WindowShell::contextHasCorrectPrototype(context); | 234 return V8WindowShell::contextHasCorrectPrototype(context); |
235 } | 235 } |
236 | 236 |
237 } // namespace WebCore | 237 } // namespace WebCore |
OLD | NEW |