DOMWrapperWorld::~DOMWrapperWorld() { ASSERT(!isMainWorld()); if (!isIsolatedWorld()) return; WorldMap& map = isolatedWorldMap(); WorldMap::iterator i = map.find(m_worldId); if (i == map.end()) { ASSERT_NOT_REACHED(); return; } ASSERT(i->value == this); map.remove(i); isolatedWorldCount--; ASSERT(map.size() == isolatedWorldCount); }
DOMWrapperWorld::~DOMWrapperWorld() { ASSERT(!isMainWorld()); dispose(); }
DOMWrapperWorld::DOMWrapperWorld(FakeWorldMarker marker) : m_isFakeWorld(marker == FakeWorld) , m_domDataStore(adoptPtr(new DOMDataStore(isMainWorld()))) { }
void DOMWrapperWorld::setIsolatedWorldField(v8::Handle<v8::Context> context) { context->SetAlignedPointerInEmbedderData(v8ContextIsolatedWorld, isMainWorld() ? 0 : this); }
DOMWrapperWorld::DOMWrapperWorld(v8::Isolate* isolate, int worldId, int extensionGroup) : m_worldId(worldId) , m_extensionGroup(extensionGroup) , m_domDataStore(adoptPtr(new DOMDataStore(isolate, isMainWorld()))) { }
void DOMWrapperWorld::setIsolatedWorldField(v8::Handle<v8::Context> context) { V8PerContextDataHolder::from(context)->setIsolatedWorld(isMainWorld() ? 0 : this); }