diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-25 10:38:09 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-25 10:38:09 -0800 |
commit | 8b90ee66872aa883fc46ac2b6e7acad35c7c96c6 (patch) | |
tree | 79fd202031c8eb820087fe774eb3d06c282a4374 | |
parent | e77fc688dde137da9e91dce9bf7326541b5e19c1 (diff) | |
download | pdfium-8b90ee66872aa883fc46ac2b6e7acad35c7c96c6.tar.xz |
Merge to XFA: CFXJS_ObjDefinition's lifetime must match isolate.
Review URL: https://codereview.chromium.org/1468423004 .
(cherry picked from commit 628f7053cc646c58c61add247c75bc65ac135327)
BUG=561184
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/1473943002 .
-rw-r--r-- | fpdfsdk/src/jsapi/fxjs_v8.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp index 9c2c538aa8..9a3a268652 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp @@ -356,12 +356,14 @@ void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, pObjDef->m_pDestructor(pObj); FXJS_FreePrivate(pObj); } - delete pObjDef; } if (pIsolate == g_isolate && --g_isolate_ref_count > 0) return; + for (int i = 0; i < maxID; ++i) + delete CFXJS_ObjDefinition::ForID(pIsolate, i); + pIsolate->SetData(g_embedderDataSlot, nullptr); delete pData; } |