Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: fpdfsdk/jsapi/fxjs_v8.cpp

Issue 1831723004: Re-land "Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed."" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Change destruction order. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/jsapi/fxjs_v8.h ('k') | fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/jsapi/fxjs_v8.cpp
diff --git a/fpdfsdk/jsapi/fxjs_v8.cpp b/fpdfsdk/jsapi/fxjs_v8.cpp
index 473b54631842a3533ce0fa6d5bea4e29ba016c8a..034f2c6642356a3b1f7c658992d7ed752440728c 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);
« no previous file with comments | « fpdfsdk/include/jsapi/fxjs_v8.h ('k') | fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698