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

Unified Diff: Source/bindings/v8/custom/V8XMLHttpRequestCustom.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/bindings/v8/ScriptString.cpp ('k') | Source/core/inspector/InspectorConsoleAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
diff --git a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index ba312ed4d68b0fd5fb05a93f6e96af4661c395a4..afbce7b0a9576e9ece9bb2d85828a5854eb08949 100644
--- a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -70,12 +70,16 @@ void V8XMLHttpRequest::responseTextAttrGetterCustom(v8::Local<v8::String> name,
{
XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
ExceptionCode ec = 0;
- const String& text = xmlHttpRequest->responseText(ec);
+ ScriptValue text = xmlHttpRequest->responseText(ec);
if (ec) {
setDOMException(ec, info.GetIsolate());
return;
}
- v8SetReturnValue(info, v8String(text, info.GetIsolate()));
+ if (text.hasNoValue()) {
+ v8SetReturnValue(info, v8String(emptyString(), info.GetIsolate()));
+ return;
+ }
+ v8SetReturnValue(info, text.v8Value());
}
void V8XMLHttpRequest::responseAttrGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
« no previous file with comments | « Source/bindings/v8/ScriptString.cpp ('k') | Source/core/inspector/InspectorConsoleAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698