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/fpdfview.h" | 7 #include "public/fpdfview.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 DLLEXPORT void STDCALL FPDF_DestroyLibrary() { | 285 DLLEXPORT void STDCALL FPDF_DestroyLibrary() { |
286 #ifdef PDF_ENABLE_XFA | 286 #ifdef PDF_ENABLE_XFA |
287 CPDFXFA_App::ReleaseInstance(); | 287 CPDFXFA_App::ReleaseInstance(); |
288 #endif // PDF_ENABLE_XFA | 288 #endif // PDF_ENABLE_XFA |
289 CPDF_ModuleMgr::Destroy(); | 289 CPDF_ModuleMgr::Destroy(); |
290 CFX_GEModule::Destroy(); | 290 CFX_GEModule::Destroy(); |
291 | 291 |
292 delete g_pCodecModule; | 292 delete g_pCodecModule; |
293 g_pCodecModule = nullptr; | 293 g_pCodecModule = nullptr; |
| 294 |
| 295 IJS_Runtime::Destroy(); |
294 } | 296 } |
295 | 297 |
296 #ifndef _WIN32 | 298 #ifndef _WIN32 |
297 int g_LastError; | 299 int g_LastError; |
298 void SetLastError(int err) { | 300 void SetLastError(int err) { |
299 g_LastError = err; | 301 g_LastError = err; |
300 } | 302 } |
301 | 303 |
302 int GetLastError() { | 304 int GetLastError() { |
303 return g_LastError; | 305 return g_LastError; |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 if (!buffer) { | 1108 if (!buffer) { |
1107 *buflen = len; | 1109 *buflen = len; |
1108 } else if (*buflen >= len) { | 1110 } else if (*buflen >= len) { |
1109 memcpy(buffer, utf16Name.c_str(), len); | 1111 memcpy(buffer, utf16Name.c_str(), len); |
1110 *buflen = len; | 1112 *buflen = len; |
1111 } else { | 1113 } else { |
1112 *buflen = -1; | 1114 *buflen = -1; |
1113 } | 1115 } |
1114 return (FPDF_DEST)pDestObj; | 1116 return (FPDF_DEST)pDestObj; |
1115 } | 1117 } |
OLD | NEW |