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

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

Issue 575333002: Compile print_preview, part 2: reduce down to 260 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview
Patch Set: revert movement of enums: now handle in compiler pass Created 6 years, 3 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/component.js
diff --git a/chrome/browser/resources/print_preview/component.js b/chrome/browser/resources/print_preview/component.js
index 2baa4c8f89439419ec04d462c24a98593355443c..3437a31a1c6fb62622f60473bdd2c213cb333d97 100644
--- a/chrome/browser/resources/print_preview/component.js
+++ b/chrome/browser/resources/print_preview/component.js
@@ -31,7 +31,7 @@ cr.define('print_preview', function() {
/**
* Child components of the component.
- * @type {Array.<print_preview.Component>}
+ * @type {Array.<!print_preview.Component>}
* @private
*/
this.children_ = [];
@@ -119,7 +119,7 @@ cr.define('print_preview', function() {
},
/**
- * @param {print_preview.Component} child Component to add as a child of
+ * @param {!print_preview.Component} child Component to add as a child of
* this component.
*/
addChild: function(child) {
@@ -154,10 +154,12 @@ cr.define('print_preview', function() {
* @param {string} query Selector query to select an element starting from
* the component's root element using a depth first search for the first
* element that matches the query.
- * @return {HTMLElement} Element selected by the given query.
+ * @return {!HTMLElement} Element selected by the given query.
+ * TODO(alekseys): Check all call sites and rename this function to
+ * something like getRequiredChildElement.
*/
getChildElement: function(query) {
- return this.element_.querySelector(query);
+ return assert(this.element_.querySelector(query));
},
/**

Powered by Google App Engine
This is Rietveld 408576698