diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-02-23 09:53:09 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-23 18:32:16 +0000 |
commit | c6dc69fb69e5d9974aa451d590194d568b78131b (patch) | |
tree | bec72acd1fee95da7d321ee700cf7aff23ecfe80 /fxjs/fxjs_v8.h | |
parent | fc54e054811510c3d7c8a9c6af6c90c3222c7029 (diff) | |
download | pdfium-c6dc69fb69e5d9974aa451d590194d568b78131b.tar.xz |
Store JS string constants as single-byte strings.
Save some space since none contain non-ascii characters.
Avoid allocating C++ WideStrings just to convert back to
UTF8 when defining properties.
Change-Id: Id94db21b32ee7a96856c35a09f7550b54599ae13
Reviewed-on: https://pdfium-review.googlesource.com/2826
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/fxjs_v8.h')
-rw-r--r-- | fxjs/fxjs_v8.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h index 8283184e47..50b0b2c6d0 100644 --- a/fxjs/fxjs_v8.h +++ b/fxjs/fxjs_v8.h @@ -184,7 +184,8 @@ class CFXJS_Engine { v8::Local<v8::Value> NewNumber(double number); v8::Local<v8::Value> NewNumber(float number); v8::Local<v8::Value> NewBoolean(bool b); - v8::Local<v8::Value> NewString(const CFX_WideString& str); + v8::Local<v8::Value> NewString(const CFX_ByteStringC& str); + v8::Local<v8::Value> NewString(const CFX_WideStringC& str); v8::Local<v8::Date> NewDate(double d); v8::Local<v8::Object> NewFxDynamicObj(int nObjDefnID, bool bStatic = false); @@ -221,7 +222,6 @@ class CFXJS_Engine { void SetConstArray(const CFX_WideString& name, v8::Local<v8::Array> array); v8::Local<v8::Array> GetConstArray(const CFX_WideString& name); - v8::Local<v8::String> WSToJSString(const CFX_WideString& wsPropertyName); void Error(const CFX_WideString& message); protected: |