OLD | NEW |
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (m_pJSRuntime && pProvider->GetRuntimeFactory()) | 225 if (m_pJSRuntime && pProvider->GetRuntimeFactory()) |
226 pProvider->GetRuntimeFactory()->DeleteJSRuntime(m_pJSRuntime); | 226 pProvider->GetRuntimeFactory()->DeleteJSRuntime(m_pJSRuntime); |
227 | 227 |
228 if (pProvider->m_pEnvList.GetSize() == 0) { | 228 if (pProvider->m_pEnvList.GetSize() == 0) |
229 pProvider->ReleaseRuntime(); | 229 pProvider->SetJavaScriptInitialized(FALSE); |
230 pProvider->InitRuntime(TRUE); | |
231 } | |
232 | 230 |
233 delete m_pSysHandler; | 231 delete m_pSysHandler; |
234 m_pSysHandler = NULL; | 232 m_pSysHandler = NULL; |
235 | 233 |
236 delete m_pAnnotHandlerMgr; | 234 delete m_pAnnotHandlerMgr; |
237 m_pAnnotHandlerMgr = NULL; | 235 m_pAnnotHandlerMgr = NULL; |
238 | 236 |
239 delete m_pActionHandler; | 237 delete m_pActionHandler; |
240 m_pActionHandler = NULL; | 238 m_pActionHandler = NULL; |
241 } | 239 } |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 if (!pFocusAnnot) | 1193 if (!pFocusAnnot) |
1196 return NULL; | 1194 return NULL; |
1197 | 1195 |
1198 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { | 1196 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { |
1199 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 1197 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
1200 if (pAnnot == pFocusAnnot) | 1198 if (pAnnot == pFocusAnnot) |
1201 return pAnnot; | 1199 return pAnnot; |
1202 } | 1200 } |
1203 return NULL; | 1201 return NULL; |
1204 } | 1202 } |
OLD | NEW |