summaryrefslogtreecommitdiffstats
path: root/dom/base/FileReader.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-07 11:13:44 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-07 11:13:44 +0100
commit4470f78754246bbd134b65cad2e0a9638418677f (patch)
tree1a7c05e68edd287d1996da1a9610b33525d53a92 /dom/base/FileReader.cpp
parent7686bceecff17f91758c8c6547a78e71ff3a8c38 (diff)
downloadUXP-4470f78754246bbd134b65cad2e0a9638418677f.tar
UXP-4470f78754246bbd134b65cad2e0a9638418677f.tar.gz
UXP-4470f78754246bbd134b65cad2e0a9638418677f.tar.lz
UXP-4470f78754246bbd134b65cad2e0a9638418677f.tar.xz
UXP-4470f78754246bbd134b65cad2e0a9638418677f.zip
Avoid unnecessary string creation.
Diffstat (limited to 'dom/base/FileReader.cpp')
-rw-r--r--dom/base/FileReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/base/FileReader.cpp b/dom/base/FileReader.cpp
index 003edc61f..63a0ef2ee 100644
--- a/dom/base/FileReader.cpp
+++ b/dom/base/FileReader.cpp
@@ -452,8 +452,8 @@ FileReader::GetAsText(Blob *aBlob,
}
}
- nsDependentCSubstring data(aFileData, aDataLen);
- return nsContentUtils::ConvertStringFromEncoding(encoding, data, aResult);
+ return nsContentUtils::ConvertStringFromEncoding(
+ encoding, aFileData, aDataLen, aResult);
}
nsresult