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

Unified Diff: fpdfsdk/javascript/JS_Define.h

Issue 1861183002: Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, combine delcs with initialization. Created 4 years, 8 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 | « fpdfsdk/javascript/Document.cpp ('k') | fpdfsdk/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_Define.h
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h
index 3c148cf35849fef190283a6cc9b8d3da89fd9cfe..5ac2e29415e72184bcfa66f2396e4e563e899274 100644
--- a/fpdfsdk/javascript/JS_Define.h
+++ b/fpdfsdk/javascript/JS_Define.h
@@ -354,8 +354,8 @@ void JSSpecialPropQuery(const char*,
const v8::PropertyCallbackInfo<v8::Integer>& info) {
v8::Isolate* isolate = info.GetIsolate();
v8::String::Utf8Value utf8_value(property);
- CFX_WideString propname =
- CFX_WideString::FromUTF8(*utf8_value, utf8_value.length());
+ CFX_WideString propname = CFX_WideString::FromUTF8(
+ CFX_ByteStringC(*utf8_value, utf8_value.length()));
CJS_Object* pJSObj =
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
@@ -377,8 +377,8 @@ void JSSpecialPropGet(const char* class_name,
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
v8::String::Utf8Value utf8_value(property);
- CFX_WideString propname =
- CFX_WideString::FromUTF8(*utf8_value, utf8_value.length());
+ CFX_WideString propname = CFX_WideString::FromUTF8(
+ CFX_ByteStringC(*utf8_value, utf8_value.length()));
CFX_WideString sError;
CJS_PropValue value(pRuntime);
value.StartGetting();
@@ -404,8 +404,8 @@ void JSSpecialPropPut(const char* class_name,
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
v8::String::Utf8Value utf8_value(property);
- CFX_WideString propname =
- CFX_WideString::FromUTF8(*utf8_value, utf8_value.length());
+ CFX_WideString propname = CFX_WideString::FromUTF8(
+ CFX_ByteStringC(*utf8_value, utf8_value.length()));
CFX_WideString sError;
CJS_PropValue PropValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown));
PropValue.StartSetting();
@@ -427,8 +427,8 @@ void JSSpecialPropDel(const char* class_name,
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
v8::String::Utf8Value utf8_value(property);
- CFX_WideString propname =
- CFX_WideString::FromUTF8(*utf8_value, utf8_value.length());
+ CFX_WideString propname = CFX_WideString::FromUTF8(
+ CFX_ByteStringC(*utf8_value, utf8_value.length()));
CFX_WideString sError;
if (!pObj->DelProperty(pContext, propname.c_str(), sError)) {
CFX_ByteString cbName;
« no previous file with comments | « fpdfsdk/javascript/Document.cpp ('k') | fpdfsdk/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698