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

Side by Side Diff: fpdfsdk/src/fsdk_mgr.cpp

Issue 1351173002: XFA: contention between FXJSE and FXJS over isolate data slots (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../public/fpdf_ext.h" 7 #include "../../public/fpdf_ext.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" 9 #include "../include/fpdfxfa/fpdfxfa_doc.h"
10 #include "../include/fpdfxfa/fpdfxfa_page.h" 10 #include "../include/fpdfxfa/fpdfxfa_page.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 m_pXFADoc(pDoc), 215 m_pXFADoc(pDoc),
216 m_pIFormFiller(NULL) { 216 m_pIFormFiller(NULL) {
217 m_pSysHandler = new CFX_SystemHandler(this); 217 m_pSysHandler = new CFX_SystemHandler(this);
218 } 218 }
219 219
220 CPDFDoc_Environment::~CPDFDoc_Environment() { 220 CPDFDoc_Environment::~CPDFDoc_Environment() {
221 delete m_pIFormFiller; 221 delete m_pIFormFiller;
222 m_pIFormFiller = NULL; 222 m_pIFormFiller = NULL;
223 223
224 CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance(); 224 CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance();
225 if (pProvider->m_pEnvList.GetSize() == 0) { 225 if (pProvider->m_pEnvList.GetSize() == 0)
226 pProvider->ReleaseRuntime(); 226 pProvider->SetJavaScriptInitialized(FALSE);
227 pProvider->InitRuntime(TRUE);
228 }
229 227
230 delete m_pSysHandler; 228 delete m_pSysHandler;
231 m_pSysHandler = NULL; 229 m_pSysHandler = NULL;
232 230
233 delete m_pAnnotHandlerMgr; 231 delete m_pAnnotHandlerMgr;
234 m_pAnnotHandlerMgr = NULL; 232 m_pAnnotHandlerMgr = NULL;
235 233
236 delete m_pActionHandler; 234 delete m_pActionHandler;
237 m_pActionHandler = NULL; 235 m_pActionHandler = NULL;
238 } 236 }
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 if (!pFocusAnnot) 1189 if (!pFocusAnnot)
1192 return NULL; 1190 return NULL;
1193 1191
1194 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { 1192 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) {
1195 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); 1193 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i);
1196 if (pAnnot == pFocusAnnot) 1194 if (pAnnot == pFocusAnnot)
1197 return pAnnot; 1195 return pAnnot;
1198 } 1196 }
1199 return NULL; 1197 return NULL;
1200 } 1198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698