Index: remoting/webapp/crd/js/host_daemon_facade.js |
diff --git a/remoting/webapp/crd/js/host_daemon_facade.js b/remoting/webapp/crd/js/host_daemon_facade.js |
index 43aec855d393d963f0100fd079057c2eb7c74274..979fdf147edec48b3728e9ec2f65bce607af5547 100644 |
--- a/remoting/webapp/crd/js/host_daemon_facade.js |
+++ b/remoting/webapp/crd/js/host_daemon_facade.js |
@@ -42,7 +42,7 @@ remoting.HostDaemonFacade = function() { |
this.initializingPromise_ = null; |
/** @private {!remoting.Error} */ |
- this.error_ = remoting.Error.NONE; |
+ this.error_ = remoting.Error.none(); |
/** @private */ |
this.onIncomingMessageCallback_ = this.onIncomingMessage_.bind(this); |
@@ -207,7 +207,7 @@ remoting.HostDaemonFacade.prototype.onIncomingMessage_ = function(message) { |
this.handleIncomingMessage_(message, reply.onDone); |
} catch (/** @type {*} */ e) { |
console.error('Error while processing native message' + e); |
- reply.onError(remoting.Error.UNEXPECTED); |
+ reply.onError(remoting.Error.unexpected()); |
} |
} |
@@ -324,8 +324,9 @@ remoting.HostDaemonFacade.prototype.onDisconnect_ = function() { |
// If initialization hasn't finished then assume that the port was |
// disconnected because Native Messaging host is not installed. |
- this.error_ = this.initializingPromise_ ? remoting.Error.MISSING_PLUGIN : |
- remoting.Error.UNEXPECTED; |
+ this.error_ = this.initializingPromise_ ? |
+ new remoting.Error(remoting.Error.Tag.MISSING_PLUGIN) : |
+ remoting.Error.unexpected(); |
// Notify the error-handlers of any requests that are still outstanding. |
var pendingReplies = this.pendingReplies_; |