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

Unified Diff: ui/file_manager/gallery/js/background.js

Issue 291893006: Gallery.app: Remove old Gallery files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « ui/file_manager/file_manager_resources.grd ('k') | ui/file_manager/gallery/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/background.js
diff --git a/ui/file_manager/gallery/js/background.js b/ui/file_manager/gallery/js/background.js
index 61ea019d2f1723588bc96580eeea76886ec7484a..a3798821dbe5a49b155f6a9de6c93af2fc938e08 100644
--- a/ui/file_manager/gallery/js/background.js
+++ b/ui/file_manager/gallery/js/background.js
@@ -142,7 +142,12 @@ chrome.app.runtime.onLaunched.addListener(function(launchData) {
closePromise = appWindowPromise.then(function(appWindow) {
return new Promise(function(fulfill) {
appWindow.close();
- appWindow.onClosed.addListener(fulfill);
+ try {
+ appWindow.onClosed.addListener(fulfill);
+ } catch (error) {
+ // Sometimes it failes to addListener.
yoshiki 2014/05/23 06:16:13 The handler should be registered before closing it
hirono 2014/05/26 02:21:48 Done.
+ fulfill();
+ }
});
});
} else {
« no previous file with comments | « ui/file_manager/file_manager_resources.grd ('k') | ui/file_manager/gallery/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698