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

Issue 544873002: PDFiumEngine::~PDFiumEngine - Unload all pages_ before destroying any of them. (Closed)

Created:
6 years, 3 months ago by Tom Sepez
Modified:
6 years, 3 months ago
Reviewers:
gene
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

PDFiumEngine::~PDFiumEngine - Unload() all pages_ before destroying any of them. Currently, destroying a PDFiumPage triggers an Unload() which can result in an access to other PDFiumPages. But these other pages may already have been destroyed as a previous element via STLDeleteElements(&pages_). Instead, unload all pages first, then destroy them all afterwards so that no access to other pages will be attempted after the destruction of the first one has begun. Move the STLDeleteElements() call to the bottom, to make it more closely mimic the ordering that might occur should pages_ someday be switched from vector to ScopedPtrVector or similar. BUG=384365 Committed: https://crrev.com/885a59eed02ac54886360c2e9b5d2d1a0e42719b Cr-Commit-Position: refs/heads/master@{#293800}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M pdf/pdfium/pdfium_engine.cc View 2 chunks +5 lines, -1 line 0 comments Download
M pdf/pdfium/pdfium_page.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (2 generated)
Tom Sepez
Gene, please review.
6 years, 3 months ago (2014-09-04 22:35:12 UTC) #2
gene
lgtm!
6 years, 3 months ago (2014-09-06 00:19:31 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/544873002/1
6 years, 3 months ago (2014-09-08 17:41:38 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1) as 1013115488a3e0a7f61e8d1bc9222d5a5d281862
6 years, 3 months ago (2014-09-08 22:44:00 UTC) #6
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:48:36 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/885a59eed02ac54886360c2e9b5d2d1a0e42719b
Cr-Commit-Position: refs/heads/master@{#293800}

Powered by Google App Engine
This is Rietveld 408576698