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

Unified Diff: fpdfsdk/src/jsapi/fxjs_v8.cpp

Issue 1468423004: CFXJS_ObjDefinition's lifetime must match isolate. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/jsapi/fxjs_v8.cpp
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 4e069d52a33f5d0f4f43f6bd90eaa318cbef2a55..ed8e2e856304bb9c8fe50e06f151f29c8381a16e 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698