From a4941914bb4411dc4e9053cb344e0349db388007 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 15 Aug 2016 11:40:12 -0700 Subject: Move some v8 objects from CJS back into FXJS Create a new class to hold these, CFXJS_Engine (could have been called Runtime, but there are too many "Runtimes" already). In a subsequent patch, all the FXJS_*() functions that take an isolate as the first argument can become methods on the engine. CJS_ must still manage the isolates; this happens outside the engine. The IJS_Runtime abstraction moves up to fpdfsdk/javascript; it remains to allow for either a real JS library or a stubb one to be linked (for non-js builds). Review-Url: https://codereview.chromium.org/2241483004 --- fpdfsdk/javascript/cjs_runtime.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'fpdfsdk/javascript/cjs_runtime.h') diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h index c43a34b720..16432d5394 100644 --- a/fpdfsdk/javascript/cjs_runtime.h +++ b/fpdfsdk/javascript/cjs_runtime.h @@ -20,7 +20,7 @@ class CJS_Context; -class CJS_Runtime : public IJS_Runtime { +class CJS_Runtime : public IJS_Runtime, public CFXJS_Engine { public: class Observer { public: @@ -77,13 +77,9 @@ class CJS_Runtime : public IJS_Runtime { std::vector> m_ContextArray; CPDFDoc_Environment* const m_pApp; CPDFSDK_Document* m_pDocument; - FX_BOOL m_bBlocking; - std::set m_FieldEventSet; - v8::Isolate* m_isolate; + bool m_bBlocking; bool m_isolateManaged; - v8::Global m_context; - std::vector*> m_StaticObjects; - std::map> m_ConstArrays; + std::set m_FieldEventSet; std::set m_observers; }; -- cgit v1.2.3