diff options
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r-- | fpdfsdk/src/javascript/JS_Runtime.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/src/javascript/JS_Runtime.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp index ecb53d2d72..3e1f74beed 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.cpp +++ b/fpdfsdk/src/javascript/JS_Runtime.cpp @@ -77,7 +77,7 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) v8::HandleScope handle_scope(isolate); if (CPDFXFA_App::GetInstance()->IsJavaScriptInitialized()) { CJS_Context* pContext = (CJS_Context*)NewContext(); - FXJS_InitializeRuntime(GetIsolate(), this, m_context); + FXJS_InitializeRuntime(GetIsolate(), this, &m_context, &m_StaticObjects); ReleaseContext(pContext); return; } @@ -88,7 +88,7 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) CPDFXFA_App::GetInstance()->SetJavaScriptInitialized(TRUE); CJS_Context* pContext = (CJS_Context*)NewContext(); - FXJS_InitializeRuntime(GetIsolate(), this, m_context); + FXJS_InitializeRuntime(GetIsolate(), this, &m_context, &m_StaticObjects); ReleaseContext(pContext); } diff --git a/fpdfsdk/src/javascript/JS_Runtime.h b/fpdfsdk/src/javascript/JS_Runtime.h index db77eeb8ed..9e6b3abede 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.h +++ b/fpdfsdk/src/javascript/JS_Runtime.h @@ -9,6 +9,7 @@ #include <set> #include <utility> +#include <vector> #include "../../include/javascript/IJavaScript.h" #include "../../include/jsapi/fxjs_v8.h" @@ -77,6 +78,7 @@ class CJS_Runtime : public IJS_Runtime { v8::Isolate* m_isolate; bool m_isolateManaged; v8::Global<v8::Context> m_context; + std::vector<v8::Global<v8::Object>*> m_StaticObjects; std::set<Observer*> m_observers; }; |