diff options
Diffstat (limited to 'fxjs')
-rw-r--r-- | fxjs/fxjs_v8.cpp | 6 | ||||
-rw-r--r-- | fxjs/fxjs_v8.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index dc2071a88f..f876f8c53f 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -287,17 +287,15 @@ void CFXJS_Engine::DefineObjMethod(int nObjDefnID, } void CFXJS_Engine::DefineObjProperty(int nObjDefnID, - const wchar_t* sPropName, + const char* sPropName, v8::AccessorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut) { v8::Isolate::Scope isolate_scope(m_isolate); v8::HandleScope handle_scope(m_isolate); - CFX_ByteString bsPropertyName = FX_UTF8Encode(CFX_WideStringC(sPropName)); CFXJS_ObjDefinition* pObjDef = CFXJS_ObjDefinition::ForID(m_isolate, nObjDefnID); pObjDef->GetInstanceTemplate()->SetAccessor( - v8::String::NewFromUtf8(m_isolate, bsPropertyName.c_str(), - v8::NewStringType::kNormal) + v8::String::NewFromUtf8(m_isolate, sPropName, v8::NewStringType::kNormal) .ToLocalChecked(), pPropGet, pPropPut); } diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h index 6b988e71a2..34e299b4e2 100644 --- a/fxjs/fxjs_v8.h +++ b/fxjs/fxjs_v8.h @@ -151,7 +151,7 @@ class CFXJS_Engine { const char* sMethodName, v8::FunctionCallback pMethodCall); void DefineObjProperty(int nObjDefnID, - const wchar_t* sPropName, + const char* sPropName, v8::AccessorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut); void DefineObjAllProperties(int nObjDefnID, |