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

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

Issue 16925002: XMLHttpRequest#responseText should use a rope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer feedback Created 7 years, 6 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
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/core/xml/XMLHttpRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
index 7773f99c1f655612d31405cf8ae12a53ddafecbb..76f7e24d729efc94a49e9d9ee82a11201eefcf38 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -119,8 +119,8 @@ public:
if (xhr->readyState() != XMLHttpRequest::DONE)
return;
- String responseText = xhr->responseText(IGNORE_EXCEPTION);
- m_callback->sendSuccess(responseText);
+ ScriptString responseText = xhr->responseText(IGNORE_EXCEPTION);
+ m_callback->sendSuccess(responseText.flattenToString());
}
private:
@@ -422,12 +422,12 @@ void InspectorResourceAgent::didFailXHRLoading(ThreadableLoaderClient* client)
m_pendingXHRReplayData.remove(client);
}
-void InspectorResourceAgent::didFinishXHRLoading(ThreadableLoaderClient* client, unsigned long identifier, const String& sourceString, const String&, const String&, unsigned)
+void InspectorResourceAgent::didFinishXHRLoading(ThreadableLoaderClient* client, unsigned long identifier, ScriptString sourceString, const String&, const String&, unsigned)
{
// For Asynchronous XHRs, the inspector can grab the data directly off of the CachedResource. For sync XHRs, we need to
// provide the data here, since no CachedResource was involved.
if (m_loadingXHRSynchronously)
- m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier), sourceString);
+ m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier), sourceString.flattenToString());
m_pendingXHRReplayData.remove(client);
}
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/core/xml/XMLHttpRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698