diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-02-21 15:17:07 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-22 01:09:09 +0000 |
commit | 4d5b8c5f990b8f06a55961c1f839c5b096658925 (patch) | |
tree | 4da062ca493327ac2c991fe4b6d17f9ef4793bab /fxjs/fxjs_v8.cpp | |
parent | 9b99b63fa5e56bd820aecdc0fd2decd22a3d075a (diff) | |
download | pdfium-4d5b8c5f990b8f06a55961c1f839c5b096658925.tar.xz |
Convert JS property tables to single-byte.
Change-Id: I4daec9e05a63c55caa01402a594c3553073c439e
Reviewed-on: https://pdfium-review.googlesource.com/2818
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r-- | fxjs/fxjs_v8.cpp | 6 |
1 files changed, 2 insertions, 4 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); } |