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

Issue 2701473008: Keep the reference to local private variable. (Closed)

Created:
3 years, 10 months ago by sgurun-gerrit only
Modified:
3 years, 10 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2987
Project:
chromium
Visibility:
Public.

Description

Keep 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M android_webview/apk/java/proguard.flags View 2 chunks +4 lines, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwPdfExporter.java View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
sgurun-gerrit only
3 years, 10 months ago (2017-02-16 21:34:28 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
7d29da5a764d976e07d45278630b696da1f281b2.

Powered by Google App Engine
This is Rietveld 408576698