InjectedScript InjectedScriptManager::injectedScriptForId(int id) { IdToInjectedScriptMap::iterator it = m_idToInjectedScript.find(id); if (it != m_idToInjectedScript.end()) return it->value; for (ExecStateToId::iterator it = m_scriptStateToId.begin(); it != m_scriptStateToId.end(); ++it) { if (it->value == id) return injectedScriptFor(it->key); } return InjectedScript(); }
InjectedScript InjectedScriptManager::injectedScriptForId(int id) { IdToInjectedScriptMap::iterator it = m_idToInjectedScript.find(id); if (it != m_idToInjectedScript.end()) return it->second; for (ScriptStateToId::iterator it = m_scriptStateToId.begin(); it != m_scriptStateToId.end(); ++it) { if (it->second == id) return injectedScriptFor(it->first); } return InjectedScript(); }