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

Side by Side Diff: core/include/fxcrt/fx_basic.h

Issue 875263002: Fix infinite recursion in CPDF_Parser::ParseIndirectObjectAt(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: explicit constructor. Created 5 years, 11 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 | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.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 #ifndef _FX_BASIC_H_ 7 #ifndef _FX_BASIC_H_
8 #define _FX_BASIC_H_ 8 #define _FX_BASIC_H_
9 #ifndef _FX_SYSTEM_H_ 9 #ifndef _FX_SYSTEM_H_
10 #include "fx_system.h" 10 #include "fx_system.h"
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_Bi naryBuf& dest_buf) = 0; 1407 virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_Bi naryBuf& dest_buf) = 0;
1408 virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) = 0; 1408 virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) = 0;
1409 void ReportEOF(FX_DWORD left_input); 1409 void ReportEOF(FX_DWORD left_input);
1410 1410
1411 FX_BOOL m_bEOF; 1411 FX_BOOL m_bEOF;
1412 1412
1413 FX_DWORD m_SrcPos; 1413 FX_DWORD m_SrcPos;
1414 1414
1415 CFX_DataFilter* m_pDestFilter; 1415 CFX_DataFilter* m_pDestFilter;
1416 }; 1416 };
1417
1418 template<typename T>
1419 class CFX_AutoRestorer {
1420 public:
1421 explicit CFX_AutoRestorer(T* location) {
1422 m_Location = location;
1423 m_OldValue = *location;
1424 }
1425 ~CFX_AutoRestorer() { *m_Location = m_OldValue; }
1426
1427 private:
1428 T* m_Location;
1429 T m_OldValue;
1430 };
1431
1417 template <class T> 1432 template <class T>
1418 class CFX_SmartPointer 1433 class CFX_SmartPointer
1419 { 1434 {
1420 public: 1435 public:
1421 CFX_SmartPointer(T *pObj) : m_pObj(pObj) {} 1436 CFX_SmartPointer(T *pObj) : m_pObj(pObj) {}
1422 ~CFX_SmartPointer() 1437 ~CFX_SmartPointer()
1423 { 1438 {
1424 m_pObj->Release(); 1439 m_pObj->Release();
1425 } 1440 }
1426 operator T*(void) 1441 operator T*(void)
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 FX_FLOAT c; 1649 FX_FLOAT c;
1635 FX_FLOAT d; 1650 FX_FLOAT d;
1636 FX_FLOAT e; 1651 FX_FLOAT e;
1637 FX_FLOAT f; 1652 FX_FLOAT f;
1638 FX_FLOAT g; 1653 FX_FLOAT g;
1639 FX_FLOAT h; 1654 FX_FLOAT h;
1640 FX_FLOAT i; 1655 FX_FLOAT i;
1641 }; 1656 };
1642 1657
1643 #endif 1658 #endif
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698