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

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

Issue 472563002: Remove try/catch block (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Tabify Created 6 years, 4 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
« no previous file with comments | « fpdfsdk/include/javascript/JS_Define.h ('k') | fpdfsdk/src/fpdftext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "../include/fpdf_progressive.h" 7 #include "../include/fpdf_progressive.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 #include "../include/fpdfview.h" 9 #include "../include/fpdfview.h"
10 #include "../include/fsdk_rendercontext.h" 10 #include "../include/fsdk_rendercontext.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap); 42 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap);
43 #else 43 #else
44 pContext->m_pDevice = FX_NEW CFX_FxgeDevice; 44 pContext->m_pDevice = FX_NEW CFX_FxgeDevice;
45 if (flags & FPDF_REVERSE_BYTE_ORDER) 45 if (flags & FPDF_REVERSE_BYTE_ORDER)
46 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap,0,TRUE); 46 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap,0,TRUE);
47 else 47 else
48 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap); 48 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap);
49 #endif 49 #endif
50 IFSDK_PAUSE_Adapter IPauseAdapter(pause); 50 IFSDK_PAUSE_Adapter IPauseAdapter(pause);
51 51
52 » if (flags & FPDF_NO_CATCH) 52 » Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate , flags,FALSE, &IPauseAdapter);
53 » » Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y , rotate, flags,FALSE, &IPauseAdapter);
54 » else {
55 » » try {
56 » » » Func_RenderPage(pContext, page, start_x, start_y, size_x , size_y, rotate, flags,FALSE, &IPauseAdapter);
57 » » » }
58 » » catch (...){}
59 » }
60 53
61 if ( pContext->m_pRenderer ) 54 if ( pContext->m_pRenderer )
62 { 55 {
63 CPDF_ProgressiveRenderer::RenderStatus status = CPDF_Progressive Renderer::Failed; 56 CPDF_ProgressiveRenderer::RenderStatus status = CPDF_Progressive Renderer::Failed;
64 status = pContext->m_pRenderer->GetStatus(); 57 status = pContext->m_pRenderer->GetStatus();
65 return status; 58 return status;
66 } 59 }
67 return FPDF_RENDER_FAILED; 60 return FPDF_RENDER_FAILED;
68 } 61 }
69 62
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 98
106 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void *)1); 99 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void *)1);
107 if (pContext) 100 if (pContext)
108 { 101 {
109 pContext->m_pDevice->RestoreState(); 102 pContext->m_pDevice->RestoreState();
110 delete pContext; 103 delete pContext;
111 pPage->RemovePrivateData((void*)1); 104 pPage->RemovePrivateData((void*)1);
112 } 105 }
113 } 106 }
114 107
OLDNEW
« no previous file with comments | « fpdfsdk/include/javascript/JS_Define.h ('k') | fpdfsdk/src/fpdftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698