Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp

Issue 1812983002: [DevTools] Move evaluate from InjectedScriptSource.js to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-evaluate-on-call-frame
Patch Set: Removed _callFrameForId Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
index 7d74a17d6a282b02bd04ed048efc32b974b6f7f7..f7ae8395986571e73b4d6e1aa6f87828e1ea717e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
@@ -65,23 +65,18 @@ InjectedScriptHost* InjectedScriptManager::injectedScriptHost()
return m_injectedScriptHost.get();
}
-InjectedScript* InjectedScriptManager::findInjectedScript(int id) const
+InjectedScript* InjectedScriptManager::findInjectedScript(ErrorString* errorString, int id) const
{
IdToInjectedScriptMap::const_iterator it = m_idToInjectedScript.find(id);
if (it != m_idToInjectedScript.end())
return it->second;
+ *errorString = "Inspected frame has gone";
return nullptr;
}
InjectedScript* InjectedScriptManager::findInjectedScript(ErrorString* errorString, RemoteObjectIdBase* objectId) const
{
- InjectedScript* injectedScript = nullptr;
- if (objectId) {
- injectedScript = findInjectedScript(objectId->contextId());
- if (!injectedScript)
- *errorString = "Inspected frame has gone";
- }
- return injectedScript;
+ return objectId ? findInjectedScript(errorString, objectId->contextId()) : nullptr;
}
void InjectedScriptManager::discardInjectedScripts()

Powered by Google App Engine
This is Rietveld 408576698