summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2017-08-28 15:13:09 -0700
committerPhilip P. Moltmann <moltmann@google.com>2017-08-29 08:22:15 -0700
commit7bc18b20fa1a175e565532a67cd015ff1f9c0841 (patch)
treef3a0da4e920da9b13c8c1b56831765918f44bf76 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9f5e99159056da901aefc4ac4ff26aa382a23765 (diff)
Deal with finalize() after failed constructor
If the constructor throws an exception, the object will still be finalized. Hence we have to make sure to set objects that are cleaned up to 0/null and clean up everything else. Otherwise the finalizer might double clean up a failed PdfRenderer. It also appears that the Pdfium error state is only set if a open-doc function fail. Hence remove it in every other case. Otherwise successes might read the error of the last call. Fixes: 63875707, 37052344 Test: cts-tradefed run singleCommand cts-dev -m Pdf --test=android.graphics.pdf.cts.PdfRendererTest Change-Id: I6d9fc26be768ba1e338344740e340cf9b56386e9
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions