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

Unified Diff: fpdfsdk/include/jsapi/fxjs_v8.h

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 | « no previous file | fpdfsdk/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/jsapi/fxjs_v8.h
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h
index dad1eaa8886022ca648ee7afd3ca760c0e29f1b2..00107ef7e5620ec1a0bd94d1d89e8d217fb6d51f 100644
--- a/fpdfsdk/include/jsapi/fxjs_v8.h
+++ b/fpdfsdk/include/jsapi/fxjs_v8.h
@@ -97,7 +97,8 @@ class FXJS_PerIsolateData {
static void SetUp(v8::Isolate* pIsolate);
static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate);
void CreateDynamicObjsMap(v8::Isolate* pIsolate) {
- m_pDynamicObjsMap = new V8TemplateMap(pIsolate);
+ if (!m_pDynamicObjsMap)
+ m_pDynamicObjsMap = new V8TemplateMap(pIsolate);
}
void ReleaseDynamicObjsMap() {
delete m_pDynamicObjsMap;
« no previous file with comments | « no previous file | fpdfsdk/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698