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

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

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nuked concatenated, fixed comments Created 5 years, 4 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/V8DebuggerAgent.cpp
diff --git a/Source/core/inspector/V8DebuggerAgent.cpp b/Source/core/inspector/V8DebuggerAgent.cpp
index 4150b20c25ceea093494bf69cc41128f0800945d..7179d3bdc56e247a68be72bdb2b5662c95827520 100644
--- a/Source/core/inspector/V8DebuggerAgent.cpp
+++ b/Source/core/inspector/V8DebuggerAgent.cpp
@@ -585,10 +585,7 @@ void V8DebuggerAgent::setScriptSource(ErrorString* error, RefPtr<TypeBuilder::De
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 V8DebuggerAgent::restartFrame(ErrorString* errorString, const String& callFrameId, RefPtr<Array<CallFrame>>& newCallFrames, RefPtr<StackTrace>& asyncStackTrace)
@@ -625,10 +622,6 @@ void V8DebuggerAgent::getScriptSource(ErrorString* error, const String& scriptId
*error = "No script for id: " + scriptId;
return;
}
-
- String url = it->value.url();
- if (!url.isEmpty() && getEditedScript(url, scriptSource))
- return;
*scriptSource = it->value.source();
}
@@ -1422,14 +1415,6 @@ void V8DebuggerAgent::changeJavaScriptRecursionLevel(int step)
}
}
-bool V8DebuggerAgent::getEditedScript(const String& url, String* content)
-{
- if (!m_editedScripts.contains(url))
- return false;
- *content = m_editedScripts.get(url);
- return true;
-}
-
PassRefPtr<Array<CallFrame>> V8DebuggerAgent::currentCallFrames()
{
if (!m_pausedScriptState || m_currentCallStack.IsEmpty())
@@ -1725,11 +1710,6 @@ void V8DebuggerAgent::reset()
frontend()->globalObjectCleared();
}
-void V8DebuggerAgent::resetModifiedSources()
-{
- m_editedScripts.clear();
-}
-
DEFINE_TRACE(V8DebuggerAgent)
{
#if ENABLE(OILPAN)

Powered by Google App Engine
This is Rietveld 408576698