summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/fxjs_v8.cpp5
-rw-r--r--fxjs/fxjs_v8.h2
2 files changed, 3 insertions, 4 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,
diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h
index 34e299b4e2..8283184e47 100644
--- a/fxjs/fxjs_v8.h
+++ b/fxjs/fxjs_v8.h
@@ -160,7 +160,7 @@ class CFXJS_Engine {
v8::NamedPropertySetterCallback pPropPut,
v8::NamedPropertyDeleterCallback pPropDel);
void DefineObjConst(int nObjDefnID,
- const wchar_t* sConstName,
+ const char* sConstName,
v8::Local<v8::Value> pDefault);
void DefineGlobalMethod(const char* sMethodName,
v8::FunctionCallback pMethodCall);