void WindowProxyManager::setGlobals(const HashMap<DOMWrapperWorld*, v8::Local<v8::Object>>& map) { for (auto& entry : map) windowProxy(*entry.key)->setGlobal(entry.value); }
bool ScriptController::initializeMainWorld() { if (m_windowProxyManager->mainWorldProxy()->isContextInitialized()) return false; return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); }
void WindowProxyManager::releaseGlobals(HashMap<DOMWrapperWorld*, v8::Local<v8::Object>>& map) { map.add(&m_windowProxy->world(), m_windowProxy->releaseGlobal()); for (auto& entry : m_isolatedWorlds) map.add(&entry.value->world(), windowProxy(entry.value->world())->releaseGlobal()); }