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

Unified Diff: remoting/webapp/crd/js/xhr.js

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: remoting/webapp/crd/js/xhr.js
diff --git a/remoting/webapp/crd/js/xhr.js b/remoting/webapp/crd/js/xhr.js
index f159fb61c00628fde4336852bc5e213c4b149f7e..bb60b87f5949e73db40661a0fbb13596194fe765 100644
--- a/remoting/webapp/crd/js/xhr.js
+++ b/remoting/webapp/crd/js/xhr.js
@@ -188,7 +188,8 @@ remoting.xhr.doMethod = function(methodName, url, onDone,
return xhr;
};
-/** Generic success/failure response proxy.
+/**
+ * Generic success/failure response proxy.
*
* @param {function():void} onDone
* @param {function(remoting.Error):void} onError
@@ -196,13 +197,14 @@ remoting.xhr.doMethod = function(methodName, url, onDone,
*/
remoting.xhr.defaultResponse = function(onDone, onError) {
/** @param {XMLHttpRequest} xhr */
- return function(xhr) {
+ var result = function(xhr) {
/** @type {remoting.Error} */
- var error = remoting.Error.fromHttpError(xhr.status)
+ var error = remoting.Error.fromHttpError(/** @type {number} */ (xhr.status))
if (error == remoting.Error.NONE) {
onDone();
} else {
onError(error);
}
};
+ return result;
};

Powered by Google App Engine
This is Rietveld 408576698