summaryrefslogtreecommitdiff
path: root/fxjs/fxjs_v8.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-02-21 15:26:52 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-02-22 01:09:31 +0000
commit55db09131508cd347c9f84b5ce1904e84e01a60c (patch)
treea3bb85c321c91bff8c5968d8a5f69a4c3025b1d1 /fxjs/fxjs_v8.cpp
parent4d5b8c5f990b8f06a55961c1f839c5b096658925 (diff)
downloadpdfium-55db09131508cd347c9f84b5ce1904e84e01a60c.tar.xz
Move JS constant tables to single-byte names
none are non-ascii characters, so save space. Change-Id: I5e81e8847a2ce4a5ffa3422d2103ffe453036e7c Reviewed-on: https://pdfium-review.googlesource.com/2819 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.cpp5
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,