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

Issue 2695123005: 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:
paulmiller
CC:
chromium-reviews, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
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} Committed: https://chromium.googlesource.com/chromium/src/+/5e06547be990aacac4ae3ff0382d2aa222b4280a

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: 8 (5 generated)
paulmiller
On 2017/02/15 01:08:34, sgurun wrote: > mailto:sgurun@chromium.org changed reviewers: > + mailto:paulmiller@chromium.org lgtm
3 years, 10 months ago (2017-02-15 01:12:21 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2695123005/1
3 years, 10 months ago (2017-02-15 02:55:46 UTC) #5
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 07:04:24 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/5e06547be990aacac4ae3ff0382d...

Powered by Google App Engine
This is Rietveld 408576698