summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-02-21 15:17:07 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-02-22 01:09:09 +0000
commit4d5b8c5f990b8f06a55961c1f839c5b096658925 (patch)
tree4da062ca493327ac2c991fe4b6d17f9ef4793bab /fxjs
parent9b99b63fa5e56bd820aecdc0fd2decd22a3d075a (diff)
downloadpdfium-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')
-rw-r--r--fxjs/fxjs_v8.cpp6
-rw-r--r--fxjs/fxjs_v8.h2
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,