diff options
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/javascript/JS_Runtime.h | 2 | ||||
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h index 67ce9c0414..dd21e6d2f1 100644 --- a/fpdfsdk/include/javascript/JS_Runtime.h +++ b/fpdfsdk/include/javascript/JS_Runtime.h @@ -10,7 +10,6 @@ #include <set> #include <utility> -#include "../../../third_party/base/nonstd_unique_ptr.h" #include "../../../core/include/fxcrt/fx_basic.h" #include "../jsapi/fxjs_v8.h" #include "IJavaScript.h" @@ -55,7 +54,6 @@ class CJS_Runtime : public IFXJS_Runtime { std::set<FieldEvent> m_FieldEventSet; v8::Isolate* m_isolate; bool m_isolateManaged; - nonstd::unique_ptr<FXJS_ArrayBufferAllocator> m_pArrayBufferAllocator; v8::Global<v8::Context> m_context; }; diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index 60fcea6341..1705b894cf 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -62,9 +62,14 @@ using FXJS_CONSTRUCTOR = void (*)(IFXJS_Context* cc, using FXJS_DESTRUCTOR = void (*)(v8::Local<v8::Object> obj); // Call before making FXJS_PrepareIsolate call. -void FXJS_Initialize(unsigned int embedderDataSlot); +void FXJS_Initialize(unsigned int embedderDataSlot, v8::Isolate* pIsolate); void FXJS_Release(); +// Gets the global isolate set by FXJS_Initialize(), or makes a new one each +// time if there is no such isolate. Returns true if a new isolate had to be +// created. +bool FXJS_GetIsolate(v8::Isolate** pResultIsolate); + // Call before making FXJS_Define* calls. Resources allocated here are cleared // as part of FXJS_ReleaseRuntime(). void FXJS_PrepareIsolate(v8::Isolate* pIsolate); |