summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/jsapi
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-30 16:56:12 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-30 17:07:17 -0800
commitc616483e834b791b92b0c0d4f99d0ea3b66f1a4f (patch)
treee9589ee48c4aeb5e0ab5e9ba0766e6d8c1f768dd /fpdfsdk/src/jsapi
parentbb1405dda43fd4b605fd9c2808dc0ead87f54ccc (diff)
downloadpdfium-c616483e834b791b92b0c0d4f99d0ea3b66f1a4f.tar.xz
XFA: merge patch from CL 733693003, get rid of FX_LPCSTR cast
Get rid of FX_LPCSTR cast. Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
Diffstat (limited to 'fpdfsdk/src/jsapi')
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index dcfe4c6663..d5d0aa1566 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -253,7 +253,7 @@ void JS_InitialRuntime(IJS_Runtime* pJSRuntime,IFXJS_Runtime* pFXRuntime, IFXJS_
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(i);
CFX_WideString ws = CFX_WideString(pObjDef->objName);
CFX_ByteString bs = ws.UTF8Encode();
- v8::Handle<v8::String> objName = v8::String::NewFromUtf8(isolate,(FX_LPCSTR)bs, v8::String::kNormalString, bs.GetLength());
+ v8::Handle<v8::String> objName = v8::String::NewFromUtf8(isolate, bs.c_str(), v8::String::kNormalString, bs.GetLength());
if(pObjDef->objType == JS_DYNAMIC)
@@ -327,7 +327,7 @@ int JS_Parse(IJS_Runtime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t*
CFX_ByteString bsScript = wsScript.UTF8Encode();
- v8::Handle<v8::Script> compiled_script = v8::Script::Compile(v8::String::NewFromUtf8(isolate,(FX_LPCSTR)bsScript,v8::String::kNormalString, bsScript.GetLength()));
+ v8::Handle<v8::Script> compiled_script = v8::Script::Compile(v8::String::NewFromUtf8(isolate, bsScript.c_str(), v8::String::kNormalString, bsScript.GetLength()));
if (compiled_script.IsEmpty()) {
v8::String::Utf8Value error(try_catch.Exception());
return -1;
@@ -344,7 +344,7 @@ int JS_Execute(IJS_Runtime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t
CFX_WideString wsScript(script);
CFX_ByteString bsScript = wsScript.UTF8Encode();
- v8::Handle<v8::Script> compiled_script = v8::Script::Compile(v8::String::NewFromUtf8(isolate,(FX_LPCSTR)bsScript,v8::String::kNormalString, bsScript.GetLength()));
+ v8::Handle<v8::Script> compiled_script = v8::Script::Compile(v8::String::NewFromUtf8(isolate, bsScript.c_str(), v8::String::kNormalString, bsScript.GetLength()));
if (compiled_script.IsEmpty()) {
v8::String::Utf8Value error(try_catch.Exception());
return -1;
@@ -556,7 +556,7 @@ v8::Handle<v8::String> WSToJSString(IJS_Runtime* pJSRuntime, const wchar_t* Prop
CFX_WideString ws = CFX_WideString(PropertyName,Len);
CFX_ByteString bs = ws.UTF8Encode();
if(!pJSRuntime) pJSRuntime = v8::Isolate::GetCurrent();
- return v8::String::NewFromUtf8(pJSRuntime, (FX_LPCSTR)bs);
+ return v8::String::NewFromUtf8(pJSRuntime, bs.c_str());
}
v8::Handle<v8::Value> JS_GetObjectElement(IJS_Runtime* pJSRuntime, v8::Handle<v8::Object> pObj,const wchar_t* PropertyName)