diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-02-05 15:13:09 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-05 15:13:09 +0000 |
commit | b5b7972cdc064498b45d230225aa92fee1acc7b6 (patch) | |
tree | 544ffaf0db87f3538a0d3caee2640c55483f970d /fxjs/fxjs_v8.h | |
parent | b1d7872faacbd37c03eacc1e86214904db8f658f (diff) | |
download | pdfium-b5b7972cdc064498b45d230225aa92fee1acc7b6.tar.xz |
Move const arrays to CFXJS_Engine from CJS_V8
CJS_V8 is shared by both the non-xfa and xfa-side JS engines,
but the const arrays are only used by the non-xfa side.
Change-Id: Ic5ed8238df1a14dde8a4463b2388b4a7a923e392
Reviewed-on: https://pdfium-review.googlesource.com/25250
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/fxjs_v8.h')
-rw-r--r-- | fxjs/fxjs_v8.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h index 6878bcd41d..4e6b248b5e 100644 --- a/fxjs/fxjs_v8.h +++ b/fxjs/fxjs_v8.h @@ -189,12 +189,16 @@ class CFXJS_Engine : public CJS_V8 { return v8::Local<v8::Context>::New(GetIsolate(), m_V8Context); } + v8::Local<v8::Array> GetConstArray(const WideString& name); + void SetConstArray(const WideString& name, v8::Local<v8::Array> array); + protected: CFXJS_Engine(); private: v8::Global<v8::Context> m_V8Context; std::vector<v8::Global<v8::Object>*> m_StaticObjects; + std::map<WideString, v8::Global<v8::Array>> m_ConstArrays; }; #endif // FXJS_FXJS_V8_H_ |