Chromium Code Reviews| Index: chrome/browser/resources/print_preview/native_layer.js |
| diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js |
| index 22a94693450b9fed47d36c889a5c0af8b515e81e..7657d94325fb8c91a5a3dd75dd47b4b53212dbe6 100644 |
| --- a/chrome/browser/resources/print_preview/native_layer.js |
| +++ b/chrome/browser/resources/print_preview/native_layer.js |
| @@ -550,6 +550,11 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onUpdateWithPrinterCapabilities_: function(settingsInfo) { |
| + if (settingsInfo.capabilities == null) { |
|
dpapad
2017/05/01 17:39:28
Why are we doing this in Javascript instead of C++
skau
2017/05/01 22:51:26
It crept up as a bug. The code you referenced onl
|
| + this.onFailedToGetPrinterCapabilities_(settingsInfo['printerId']); |
| + return; |
| + } |
| + |
| var capsSetEvent = new Event(NativeLayer.EventType.CAPABILITIES_SET); |
| capsSetEvent.settingsInfo = settingsInfo; |
| this.dispatchEvent(capsSetEvent); |