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

Unified Diff: ui/file_manager/video_player/js/error_util.js

Issue 823583005: Add type annotations to caster.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/video_player/js/cast/caster.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/error_util.js
diff --git a/ui/file_manager/video_player/js/error_util.js b/ui/file_manager/video_player/js/error_util.js
index 597a239391e165f11eb76f2a0cefb9f093658bbd..5780dd51192f4c2aa68f27b58063d44c08f2fb8c 100644
--- a/ui/file_manager/video_player/js/error_util.js
+++ b/ui/file_manager/video_player/js/error_util.js
@@ -19,15 +19,14 @@ window.onerror = function() { window.JSErrorCount++; };
* - Capture the stack trace in case of error.
* - Bind this object
*
- * @param {Object} thisObject Object to be used as this.
+ * @param {Object=} opt_thisObject Object to be used as this.
* @param {...} var_args Arguments to be bound with the wrapped function.
* @return {function} Wrapped function.
*/
-Function.prototype.wrap = function(thisObject, var_args) {
+Function.prototype.wrap = function(opt_thisObject, var_args) {
var func = this;
var liveStack = (new Error('Stack trace before async call')).stack;
- if (thisObject === undefined)
- thisObject = null;
+ var thisObject = opt_thisObject || null;
var boundArguments = Array.prototype.slice.call(arguments, 1);
return function wrappedCallback(var_args) {
« no previous file with comments | « ui/file_manager/video_player/js/cast/caster.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698