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

Unified Diff: fpdfsdk/src/jsapi/fxjs_v8.cpp

Issue 733693003: Getting rid of more (FX_LPCWSTR) casts and fixing two bugs revealed by this. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebasing to latest origin/master. Created 6 years, 1 month 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
« core/src/fxcrt/fx_xml_parser.cpp ('K') | « fpdfsdk/src/javascript/util.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/jsapi/fxjs_v8.cpp
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 5eb9873f5ce5d73073f5548cead75805487be27f..7d1226e2349ac5423e18b46ccf80a09750a49e06 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -93,7 +93,7 @@ int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* s
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
- CFX_WideString ws = CFX_WideString((FX_LPCWSTR)sMethodName);
+ CFX_WideString ws = CFX_WideString(sMethodName);
CFX_ByteString bsMethodName = ws.UTF8Encode();
CFX_PtrArray* pArray = (CFX_PtrArray*)isolate->GetData(0);
@@ -113,7 +113,7 @@ int JS_DefineObjProperty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t*
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
- CFX_WideString ws = CFX_WideString((FX_LPCWSTR)sPropName);
+ CFX_WideString ws = CFX_WideString(sPropName);
CFX_ByteString bsPropertyName = ws.UTF8Encode();
CFX_PtrArray* pArray = (CFX_PtrArray*)isolate->GetData(0);
@@ -153,7 +153,7 @@ int JS_DefineObjConst(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sC
CFX_PtrArray* pArray = (CFX_PtrArray*)isolate->GetData(0);
if(!pArray) return 0;
- CFX_WideString ws = CFX_WideString((FX_LPCWSTR)sConstName);
+ CFX_WideString ws = CFX_WideString(sConstName);
CFX_ByteString bsConstName = ws.UTF8Encode();
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
@@ -188,7 +188,7 @@ int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
- CFX_WideString ws = CFX_WideString((FX_LPCWSTR)sMethodName);
+ CFX_WideString ws = CFX_WideString(sMethodName);
CFX_ByteString bsMethodName = ws.UTF8Encode();
v8::Local<v8::FunctionTemplate> funTempl = v8::FunctionTemplate::New(isolate, pMethodCall);
@@ -212,7 +212,7 @@ int JS_DefineGlobalConst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8:
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
- CFX_WideString ws = CFX_WideString((FX_LPCWSTR)sConstName);
+ CFX_WideString ws = CFX_WideString(sConstName);
CFX_ByteString bsConst= ws.UTF8Encode();
v8::Local<v8::ObjectTemplate> objTemp;
« core/src/fxcrt/fx_xml_parser.cpp ('K') | « fpdfsdk/src/javascript/util.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698