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

Unified Diff: chrome/browser/resources/gallery/js/util.js

Issue 246543002: Add script files of the separated Gallery.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply recent changes for the Gallery to the separated one. Created 6 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/gallery/js/util.js
diff --git a/chrome/browser/resources/gallery/js/util.js b/chrome/browser/resources/gallery/js/util.js
new file mode 100644
index 0000000000000000000000000000000000000000..21151e325cdddbb4b777fb5cbc6d09e7e59f7c39
--- /dev/null
+++ b/chrome/browser/resources/gallery/js/util.js
@@ -0,0 +1,15 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+'use strict';
+
+/**
+ * Shows an error message if the promise is rejected.
+ * @param {Promise} promise Promise
+ */
+function trackPromise(promise) {
+ promise.catch(function(error) {
+ console.error(error.stack || error);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698