summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/jsapi/fxjs_v8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/jsapi/fxjs_v8.cpp')
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 4e069d52a3..ed8e2e8563 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -351,12 +351,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;
}