diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-24 11:45:37 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-24 11:45:37 -0700 |
commit | 9967cc5861fbff894eed8fca40e1e5ed524b04c6 (patch) | |
tree | f4861017bd5a94dcad63df60a07b6206c0d80471 /fpdfsdk/include/jsapi/fxjs_v8.h | |
parent | 676947ce0204914da1d8fb159730432c0fb0a3a2 (diff) | |
download | pdfium-9967cc5861fbff894eed8fca40e1e5ed524b04c6.tar.xz |
Re-land "Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed.""
Fix the destruction order.
This reverts commit 129a60ec2d4d98ed953beaca629c99a52fb7e9b0.
BUG=594120
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/1831723004 .
Diffstat (limited to 'fpdfsdk/include/jsapi/fxjs_v8.h')
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index dad1eaa888..00107ef7e5 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -97,7 +97,8 @@ class FXJS_PerIsolateData { static void SetUp(v8::Isolate* pIsolate); static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate); void CreateDynamicObjsMap(v8::Isolate* pIsolate) { - m_pDynamicObjsMap = new V8TemplateMap(pIsolate); + if (!m_pDynamicObjsMap) + m_pDynamicObjsMap = new V8TemplateMap(pIsolate); } void ReleaseDynamicObjsMap() { delete m_pDynamicObjsMap; |