diff options
author | weili <weili@chromium.org> | 2016-09-21 10:19:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-21 10:19:50 -0700 |
commit | 54be7be992f1cde40b9d5c0e55a119c6cc4e4e02 (patch) | |
tree | f5b2926ecf00cba53a9becb0db08b00e64c55ff5 /fxjs/fxjs_v8.cpp | |
parent | 5819e4f334521cb1599f3d5f1f28df40528727ba (diff) | |
download | pdfium-54be7be992f1cde40b9d5c0e55a119c6cc4e4e02.tar.xz |
Fix leaks related to the usage of JSE runtime data
Per isolate runtime data should be deleted when the associated
isolate's destructed.
Also, the internal of per isolate runtime data is obscure to the JS
engine. So XFA or this class itself has to be in charge of the memory
management. Use smart pointer for it so that the resource
could be released properly.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2354923003
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r-- | fxjs/fxjs_v8.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index 53f2527ad6..5304254242 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -215,12 +215,7 @@ FXJS_PerIsolateData* FXJS_PerIsolateData::Get(v8::Isolate* pIsolate) { pIsolate->GetData(g_embedderDataSlot)); } -#ifndef PDF_ENABLE_XFA FXJS_PerIsolateData::FXJS_PerIsolateData() : m_pDynamicObjsMap(nullptr) {} -#else // PDF_ENABLE_XFA -FXJS_PerIsolateData::FXJS_PerIsolateData() - : m_pFXJSERuntimeData(nullptr), m_pDynamicObjsMap(nullptr) {} -#endif // PDF_ENABLE_XFA CFXJS_Engine::CFXJS_Engine() : m_isolate(nullptr) {} |