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

Issue 2516523002: Fix CrOS reverting to Save as PDF and random PDF preview fail (Closed)

Created:
4 years, 1 month ago by rbpotter
Modified:
4 years, 1 month ago
Reviewers:
Lei Zhang, dpapad
CC:
arv+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix CrOS reverting to Save as PDF and random PDF preview fail Increasing number of saved destinations caused a bug on Chrome OS - destination always reverted to Save as PDF. Also caused random "PDF failed to load" preview errors. This occurred since the destinations were modified one after the other too quickly, which caused a race condition that crashed PDF preview. This error occurred ~1 in 10 times. BUG=665455, 666426, 666595 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/b12aba73d3525867511b315a45d2dbc65acd2647 Cr-Commit-Position: refs/heads/master@{#433408}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix comments #

Patch Set 3 : Fix occasional PDF error problem #

Total comments: 2

Patch Set 4 : Add helper #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -78 lines) Patch
M chrome/browser/resources/print_preview/data/app_state.js View 1 1 chunk +2 lines, -62 lines 0 comments Download
M chrome/browser/resources/print_preview/data/destination_store.js View 1 2 3 7 chunks +26 lines, -16 lines 1 comment Download

Messages

Total messages: 34 (24 generated)
dpapad
LGTM. Would be nice to add a test to cover this regression. https://codereview.chromium.org/2516523002/diff/1/chrome/browser/resources/print_preview/data/print_ticket_store.js File chrome/browser/resources/print_preview/data/print_ticket_store.js ...
4 years, 1 month ago (2016-11-18 00:29:16 UTC) #6
dpapad
https://codereview.chromium.org/2516523002/diff/1/chrome/browser/resources/print_preview/data/app_state.js File chrome/browser/resources/print_preview/data/app_state.js (right): https://codereview.chromium.org/2516523002/diff/1/chrome/browser/resources/print_preview/data/app_state.js#newcode140 chrome/browser/resources/print_preview/data/app_state.js:140: get selectedDestinationId() { I am also wondering why are ...
4 years, 1 month ago (2016-11-18 00:33:20 UTC) #7
rbpotter
https://codereview.chromium.org/2516523002/diff/1/chrome/browser/resources/print_preview/data/app_state.js File chrome/browser/resources/print_preview/data/app_state.js (right): https://codereview.chromium.org/2516523002/diff/1/chrome/browser/resources/print_preview/data/app_state.js#newcode140 chrome/browser/resources/print_preview/data/app_state.js:140: get selectedDestinationId() { On 2016/11/18 00:33:20, dpapad wrote: > ...
4 years, 1 month ago (2016-11-18 02:59:23 UTC) #8
rbpotter
Added a fix for PDF preview failures.
4 years, 1 month ago (2016-11-18 19:45:47 UTC) #17
dpapad
https://codereview.chromium.org/2516523002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2516523002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js#newcode941 chrome/browser/resources/print_preview/data/destination_store.js:941: if (this.appState_.selectedDestination && Can you package these three checks ...
4 years, 1 month ago (2016-11-19 01:37:58 UTC) #21
rbpotter
https://codereview.chromium.org/2516523002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2516523002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js#newcode941 chrome/browser/resources/print_preview/data/destination_store.js:941: if (this.appState_.selectedDestination && On 2016/11/19 01:37:58, dpapad wrote: > ...
4 years, 1 month ago (2016-11-19 02:44:58 UTC) #24
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/2516523002/60001
4 years, 1 month ago (2016-11-19 05:24:11 UTC) #29
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-19 07:10:34 UTC) #31
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/b12aba73d3525867511b315a45d2dbc65acd2647 Cr-Commit-Position: refs/heads/master@{#433408}
4 years, 1 month ago (2016-11-19 07:14:33 UTC) #33
dpapad
4 years, 1 month ago (2016-11-21 18:08:56 UTC) #34
Message was sent while issue was closed.
https://codereview.chromium.org/2516523002/diff/60001/chrome/browser/resource...
File chrome/browser/resources/print_preview/data/destination_store.js (right):

https://codereview.chromium.org/2516523002/diff/60001/chrome/browser/resource...
chrome/browser/resources/print_preview/data/destination_store.js:662: return
this.appState_.selectedDestination &&
Nit: This method only refers to |this.appState_| member variables, so it belongs
to the AppState class instead of here. This is known as "feature envy", see
https://waog.wordpress.com/2014/08/25/code-smell-feature-envy/.

Powered by Google App Engine
This is Rietveld 408576698