summaryrefslogtreecommitdiff
path: root/fpdfsdk/jsapi/fxjs_v8.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-24 11:45:37 -0700
committerTom Sepez <tsepez@chromium.org>2016-03-24 11:45:37 -0700
commit9967cc5861fbff894eed8fca40e1e5ed524b04c6 (patch)
treef4861017bd5a94dcad63df60a07b6206c0d80471 /fpdfsdk/jsapi/fxjs_v8.cpp
parent676947ce0204914da1d8fb159730432c0fb0a3a2 (diff)
downloadpdfium-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/jsapi/fxjs_v8.cpp')
-rw-r--r--fpdfsdk/jsapi/fxjs_v8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/jsapi/fxjs_v8.cpp b/fpdfsdk/jsapi/fxjs_v8.cpp
index 473b546318..034f2c6642 100644
--- a/fpdfsdk/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/jsapi/fxjs_v8.cpp
@@ -374,7 +374,6 @@ void FXJS_ReleaseRuntime(v8::Isolate* pIsolate,
FXJS_PerIsolateData* pData = FXJS_PerIsolateData::Get(pIsolate);
if (!pData)
return;
- pData->ReleaseDynamicObjsMap();
int maxID = CFXJS_ObjDefinition::MaxID(pIsolate);
for (int i = 0; i < maxID; ++i) {
@@ -399,6 +398,7 @@ void FXJS_ReleaseRuntime(v8::Isolate* pIsolate,
if (pIsolate == g_isolate && --g_isolate_ref_count > 0)
return;
+ pData->ReleaseDynamicObjsMap();
for (int i = 0; i < maxID; ++i)
delete CFXJS_ObjDefinition::ForID(pIsolate, i);