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

Side by Side Diff: pdf/pdfium/pdfium_page.cc

Issue 544873002: PDFiumEngine::~PDFiumEngine - Unload all pages_ before destroying any of them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium 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 #include "pdf/pdfium/pdfium_page.h" 5 #include "pdf/pdfium/pdfium_page.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 : engine_(engine), 42 : engine_(engine),
43 page_(NULL), 43 page_(NULL),
44 text_page_(NULL), 44 text_page_(NULL),
45 index_(i), 45 index_(i),
46 rect_(r), 46 rect_(r),
47 calculated_links_(false), 47 calculated_links_(false),
48 available_(available) { 48 available_(available) {
49 } 49 }
50 50
51 PDFiumPage::~PDFiumPage() { 51 PDFiumPage::~PDFiumPage() {
52 Unload();
53 } 52 }
54 53
55 void PDFiumPage::Unload() { 54 void PDFiumPage::Unload() {
56 if (text_page_) { 55 if (text_page_) {
57 FPDFText_ClosePage(text_page_); 56 FPDFText_ClosePage(text_page_);
58 text_page_ = NULL; 57 text_page_ = NULL;
59 } 58 }
60 59
61 if (page_) { 60 if (page_) {
62 if (engine_->form()) { 61 if (engine_->form()) {
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 new_left, new_top, new_right - new_left + 1, new_bottom - new_top + 1); 468 new_left, new_top, new_right - new_left + 1, new_bottom - new_top + 1);
470 } 469 }
471 470
472 PDFiumPage::Link::Link() { 471 PDFiumPage::Link::Link() {
473 } 472 }
474 473
475 PDFiumPage::Link::~Link() { 474 PDFiumPage::Link::~Link() {
476 } 475 }
477 476
478 } // namespace chrome_pdf 477 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698