diff options
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r-- | fxjs/fxjs_v8.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index f876f8c53f..1f049a0dd3 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -315,14 +315,13 @@ void CFXJS_Engine::DefineObjAllProperties( } void CFXJS_Engine::DefineObjConst(int nObjDefnID, - const wchar_t* sConstName, + const char* sConstName, v8::Local<v8::Value> pDefault) { v8::Isolate::Scope isolate_scope(m_isolate); v8::HandleScope handle_scope(m_isolate); - CFX_ByteString bsConstName = FX_UTF8Encode(CFX_WideStringC(sConstName)); CFXJS_ObjDefinition* pObjDef = CFXJS_ObjDefinition::ForID(m_isolate, nObjDefnID); - pObjDef->GetInstanceTemplate()->Set(m_isolate, bsConstName.c_str(), pDefault); + pObjDef->GetInstanceTemplate()->Set(m_isolate, sConstName, pDefault); } void CFXJS_Engine::DefineGlobalMethod(const char* sMethodName, |