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

Issue 2848093002: Process null capabilities as a capability fetch failure. (Closed)

Created:
3 years, 7 months ago by skau
Modified:
3 years, 7 months ago
Reviewers:
dpapad
CC:
arv+watch_chromium.org, chromium-reviews, Carlson, rbpotter, sky
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Process null capabilities as a capability fetch failure. We can never do anything if a request for printer capabilities returns null. Thus, assert that it's non-null and call the failure code if capabilities is null. This also fixes PrintPreviewDestinationSearchTest.Select which has been failing on the Linux MSan buildbot sporadically. BUG=708739, 716595 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2848093002 Cr-Commit-Position: refs/heads/master@{#468794} Committed: https://chromium.googlesource.com/chromium/src/+/d61afbf71f7ccea7bf8b2e5632e3f3d052a7813f

Patch Set 1 #

Total comments: 4

Patch Set 2 : refine assertions #

Total comments: 8

Patch Set 3 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -21 lines) Patch
M chrome/browser/resources/print_preview/native_layer.js View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.cc View 1 2 1 chunk +9 lines, -7 lines 0 comments Download
M chrome/test/data/webui/print_preview_destination_search_test.js View 1 2 2 chunks +10 lines, -14 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (15 generated)
dpapad
https://codereview.chromium.org/2848093002/diff/1/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2848093002/diff/1/chrome/browser/resources/print_preview/data/destination_store.js#newcode1547 chrome/browser/resources/print_preview/data/destination_store.js:1547: assert(rawCapabilities != null, assert(rawCapabilities); The comment does not add ...
3 years, 7 months ago (2017-05-01 17:39:28 UTC) #8
skau
PTAL. I've incorporated the review comments. https://codereview.chromium.org/2848093002/diff/1/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2848093002/diff/1/chrome/browser/resources/print_preview/data/destination_store.js#newcode1547 chrome/browser/resources/print_preview/data/destination_store.js:1547: assert(rawCapabilities != null, ...
3 years, 7 months ago (2017-05-01 22:51:26 UTC) #9
dpapad
https://codereview.chromium.org/2848093002/diff/20001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2848093002/diff/20001/chrome/browser/resources/print_preview/data/destination_store.js#newcode1563 chrome/browser/resources/print_preview/data/destination_store.js:1563: rawCapabilities); If we already assert in native_layer.js before triggering ...
3 years, 7 months ago (2017-05-02 00:07:41 UTC) #13
skau
Comments addressed. PTAL. https://codereview.chromium.org/2848093002/diff/20001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2848093002/diff/20001/chrome/browser/resources/print_preview/data/destination_store.js#newcode1563 chrome/browser/resources/print_preview/data/destination_store.js:1563: rawCapabilities); On 2017/05/02 00:07:41, dpapad wrote: ...
3 years, 7 months ago (2017-05-02 01:52:48 UTC) #16
dpapad
LGTM
3 years, 7 months ago (2017-05-02 18:55:31 UTC) #17
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/2848093002/40001
3 years, 7 months ago (2017-05-02 20:35:48 UTC) #19
commit-bot: I haz the power
3 years, 7 months ago (2017-05-02 22:27:55 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/d61afbf71f7ccea7bf8b2e5632e3...

Powered by Google App Engine
This is Rietveld 408576698