DescriptionPDFiumEngine::~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 #
Messages
Total messages: 7 (2 generated)
|