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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_grid.js

Issue 667933003: Ensure existence of queried elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make some parameters non-nullable. Created 6 years, 2 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: ui/file_manager/file_manager/foreground/js/ui/file_grid.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
index 005a54b994d9b48b7414e7de364cea3b4e4d86b1..80f60ffa9b90336161c96628e3032bb387bfeaa1 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
@@ -32,7 +32,7 @@ FileGrid.prototype.__proto__ = cr.ui.Grid.prototype;
/**
* Decorates an HTML element to be a FileGrid.
- * @param {HTMLElement} self The grid to decorate.
+ * @param {!Element} self The grid to decorate.
* @param {MetadataCache} metadataCache Metadata cache to find entries
* metadata.
* @param {VolumeManagerWrapper} volumeManager Volume manager instance.
@@ -227,6 +227,7 @@ Object.defineProperty(FileGrid.Item.prototype, 'label', {
*/
FileGrid.Item.decorate = function(li, entry, grid) {
li.__proto__ = FileGrid.Item.prototype;
+ li = /** @type {!FileGrid.Item} */ (li);
// TODO(mtomasz): Pass the metadata cache and the volume manager directly
// instead of accessing private members of grid.
FileGrid.decorateThumbnail(

Powered by Google App Engine
This is Rietveld 408576698