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

Unified Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 2848093002: Process null capabilities as a capability fetch failure. (Closed)
Patch Set: refine assertions Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..034b7aa3bf3bde55ec919ad98d099d396a083efe 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -550,6 +550,8 @@ cr.define('print_preview', function() {
* @private
*/
onUpdateWithPrinterCapabilities_: function(settingsInfo) {
+ assert(settingsInfo.capabilities,
+ 'Capabilities update without capabilites');
var capsSetEvent = new Event(NativeLayer.EventType.CAPABILITIES_SET);
capsSetEvent.settingsInfo = settingsInfo;
this.dispatchEvent(capsSetEvent);

Powered by Google App Engine
This is Rietveld 408576698