| Index: fpdfsdk/src/jsapi/fxjs_v8.cpp
|
| diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
|
| index 1f47864e96e3e08591bf8fa2f7a3a5c19a8eee47..7d919a74f85265b71fa7fc7ebad18c51710683f2 100644
|
| --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
|
| +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
|
| @@ -251,7 +251,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)
|
| @@ -324,7 +324,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;
|
| @@ -341,7 +341,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;
|
| @@ -553,7 +553,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)
|
|
|