summaryrefslogtreecommitdiff
path: root/fpdfsdk/jsapi
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-06 10:51:14 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-06 10:51:14 -0700
commit6fe7d2174a47107578da912299c93b4dfb9f2add (patch)
tree4f2d343c477c9a4ec18d25801800eb08d8938dad /fpdfsdk/jsapi
parent89bdd0876e6b92c959839908204eb82337a27ba2 (diff)
downloadpdfium-6fe7d2174a47107578da912299c93b4dfb9f2add.tar.xz
Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument.
Methods that take string arguments and do not persist them should take *StringC types as argument rather than discrete ptr/len args. Avoids a number of implicit casts from CFX_ByteString to char*. BUG= Review URL: https://codereview.chromium.org/1861183002
Diffstat (limited to 'fpdfsdk/jsapi')
-rw-r--r--fpdfsdk/jsapi/fxjs_v8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/jsapi/fxjs_v8.cpp b/fpdfsdk/jsapi/fxjs_v8.cpp
index db64eee974..c66cf91b56 100644
--- a/fpdfsdk/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/jsapi/fxjs_v8.cpp
@@ -807,7 +807,7 @@ CFX_WideString FXJS_ToString(v8::Isolate* pIsolate,
return L"";
v8::Local<v8::Context> context = pIsolate->GetCurrentContext();
v8::String::Utf8Value s(pValue->ToString(context).ToLocalChecked());
- return CFX_WideString::FromUTF8(*s, s.length());
+ return CFX_WideString::FromUTF8(CFX_ByteStringC(*s, s.length()));
}
v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate,