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

Side by Side Diff: ui/file_manager/video_player/js/error_util.js

Issue 450903002: Random clean up around Chrome OS file manager code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * This variable is checked in SelectFileDialogExtensionBrowserTest. 8 * This variable is checked in SelectFileDialogExtensionBrowserTest.
9 * @type {number} 9 * @type {number}
10 */ 10 */
(...skipping 19 matching lines...) Expand all
30 var liveStack = (new Error('Stack trace before async call')).stack; 30 var liveStack = (new Error('Stack trace before async call')).stack;
31 if (thisObject === undefined) 31 if (thisObject === undefined)
32 thisObject = null; 32 thisObject = null;
33 var boundArguments = Array.prototype.slice.call(arguments, 1); 33 var boundArguments = Array.prototype.slice.call(arguments, 1);
34 34
35 return function wrappedCallback(var_args) { 35 return function wrappedCallback(var_args) {
36 try { 36 try {
37 var args = boundArguments.concat(Array.prototype.slice.call(arguments)); 37 var args = boundArguments.concat(Array.prototype.slice.call(arguments));
38 return func.apply(thisObject, args); 38 return func.apply(thisObject, args);
39 } catch (e) { 39 } catch (e) {
40 // Some async funcrtion doesn't handle exception correctly. So outputing 40 // Some async function doesn't handle exception correctly. So outputting
41 // the exception message and stack trace just in case. 41 // the exception message and stack trace just in case.
42 // The message will show twice if the caller handles exception correctly. 42 // The message will show twice if the caller handles exception correctly.
43 console.error(e.stack); 43 console.error(e.stack);
44 console.info('Exception above happened in callback.', liveStack); 44 console.info('Exception above happened in callback.', liveStack);
45 45
46 window.JSErrorCount++; 46 window.JSErrorCount++;
47 throw e; 47 throw e;
48 } 48 }
49 } 49 }
50 }; 50 };
OLDNEW
« no previous file with comments | « ui/file_manager/video_player/js/cast/media_manager.js ('k') | ui/file_manager/video_player/js/video_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698