Chromium Code Reviews
DescriptionKeep the reference to local private variable.
Applications create a printdocumentadapter using WebView.createPrintDocumentAdapter
and passes it to Android framework, which then drives the printing flow.
If an application cleans all the references to this WebView,
then it can be GC'ed before printing flow ends. During the print UI flow,
as the user changes settings, frameworks makes calls the printdocumentadapter
that is created above, and thus WebView being GC'ed is fatal, i.e. not an exception
but printing will fail.
To prevent WebView being GC'ed we keep a reference to the webview in
AwPdfExporter, as long as frameworks owns it. Enabling proguard
optimizations optimized away this local variable. Add an explicit keep.
BUG=664400
Review-Url: https://codereview.chromium.org/2695123005
Cr-Commit-Position: refs/heads/master@{#450618}
(cherry picked from commit 5e06547be990aacac4ae3ff0382d2aa222b4280a)
Review-Url: https://codereview.chromium.org/2701473008 .
Cr-Commit-Position: refs/branch-heads/2987@{#559}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}
Committed: https://chromium.googlesource.com/chromium/src/+/7d29da5a764d976e07d45278630b696da1f281b2
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||