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

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index f60ddaeeba24adf90f6e9b76e7701c6f8246c4fc..0be0b27bc75f28be47399050b3a084b5d4e4cdeb 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -623,10 +623,7 @@ void InspectorDebuggerAgent::setScriptSource(ErrorString* error, RefPtr<TypeBuil
ScriptsMap::iterator it = m_scripts.find(scriptId);
if (it == m_scripts.end())
return;
- String url = it->value.url();
- if (url.isEmpty())
- return;
- m_editedScripts.set(url, newContent);
+ it->value.setSource(newContent);
}
void InspectorDebuggerAgent::restartFrame(ErrorString* errorString, const String& callFrameId, RefPtr<Array<CallFrame> >& newCallFrames, RefPtr<JSONObject>& result, RefPtr<StackTrace>& asyncStackTrace)
@@ -656,10 +653,6 @@ void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String& s
*error = "No script for id: " + scriptId;
return;
}
-
- String url = it->value.url();
- if (!url.isEmpty() && getEditedScript(url, scriptSource))
- return;
*scriptSource = it->value.source();
}
@@ -1426,14 +1419,6 @@ void InspectorDebuggerAgent::changeJavaScriptRecursionLevel(int step)
}
}
-bool InspectorDebuggerAgent::getEditedScript(const String& url, String* content)
-{
- if (!m_editedScripts.contains(url))
- return false;
- *content = m_editedScripts.get(url);
- return true;
-}
-
PassRefPtr<Array<CallFrame> > InspectorDebuggerAgent::currentCallFrames()
{
if (!m_pausedScriptState || m_currentCallStack.isEmpty())
@@ -1725,11 +1710,6 @@ void InspectorDebuggerAgent::reset()
frontend()->globalObjectCleared();
}
-void InspectorDebuggerAgent::resetModifiedSources()
-{
- m_editedScripts.clear();
-}
-
DEFINE_TRACE(InspectorDebuggerAgent)
{
#if ENABLE(OILPAN)

Powered by Google App Engine
This is Rietveld 408576698