Index: fxjs/include/fxjs_v8.h |
diff --git a/fxjs/include/fxjs_v8.h b/fxjs/include/fxjs_v8.h |
index 8b5fc8399aee9e34e126343cc3de465b91c520f5..c87d8a5873e64883ccb9075f5106108d47a41460 100644 |
--- a/fxjs/include/fxjs_v8.h |
+++ b/fxjs/include/fxjs_v8.h |
@@ -100,23 +100,14 @@ class FXJS_PerIsolateData { |
static void SetUp(v8::Isolate* pIsolate); |
static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate); |
- void CreateDynamicObjsMap(v8::Isolate* pIsolate) { |
- if (!m_pDynamicObjsMap) |
- m_pDynamicObjsMap = new V8TemplateMap(pIsolate); |
- } |
- void ReleaseDynamicObjsMap() { |
- delete m_pDynamicObjsMap; |
- m_pDynamicObjsMap = nullptr; |
- } |
- |
- std::vector<CFXJS_ObjDefinition*> m_ObjectDefnArray; |
+ std::vector<std::unique_ptr<CFXJS_ObjDefinition>> m_ObjectDefnArray; |
#ifdef PDF_ENABLE_XFA |
std::unique_ptr<CFXJSE_RuntimeData> m_pFXJSERuntimeData; |
#endif // PDF_ENABLE_XFA |
- V8TemplateMap* m_pDynamicObjsMap; |
+ std::unique_ptr<V8TemplateMap> m_pDynamicObjsMap; |
protected: |
- FXJS_PerIsolateData(); |
+ explicit FXJS_PerIsolateData(v8::Isolate* pIsolate); |
}; |
class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |