| Index: remoting/webapp/crd/js/it2me_helper_channel.js
|
| diff --git a/remoting/webapp/crd/js/it2me_helper_channel.js b/remoting/webapp/crd/js/it2me_helper_channel.js
|
| index 84608be60b576a47744dfaeb15e05b15a719a643..a05ad60328ae26ca12cff53ec86f6a18fcfafe1c 100644
|
| --- a/remoting/webapp/crd/js/it2me_helper_channel.js
|
| +++ b/remoting/webapp/crd/js/it2me_helper_channel.js
|
| @@ -166,8 +166,8 @@ remoting.It2MeHelperChannel.prototype.onHangoutMessage_ = function(message) {
|
| return true;
|
| }
|
| throw new Error('Unknown message method=' + message.method);
|
| - } catch(e) {
|
| - var error = /** @type {Error} */ e;
|
| + } catch(/** @type {*} */ e) {
|
| + var error = /** @type {Error} */ (e);
|
| this.sendErrorResponse_(this.hangoutPort_, error, message);
|
| }
|
| return false;
|
| @@ -204,18 +204,19 @@ remoting.It2MeHelperChannel.prototype.launchWebapp_ =
|
| throw new Error('Access code is missing');
|
| }
|
|
|
| + /**
|
| + * @this {remoting.It2MeHelperChannel}
|
| + * @param {string} instanceId
|
| + */
|
| + var setInstance = function(instanceId) {
|
| + this.instanceId_ = instanceId;
|
| + };
|
| +
|
| // Launch the webapp.
|
| this.appLauncher_.launch({
|
| mode: 'hangout',
|
| accessCode: accessCode
|
| - }).then(
|
| - /**
|
| - * @this {remoting.It2MeHelperChannel}
|
| - * @param {string} instanceId
|
| - */
|
| - function(instanceId){
|
| - this.instanceId_ = instanceId;
|
| - }.bind(this));
|
| + }).then(setInstance.bind(this));
|
| };
|
|
|
| /**
|
| @@ -270,13 +271,13 @@ remoting.It2MeHelperChannel.prototype.onWebappMessage_ = function(message) {
|
| case MessageTypes.SESSION_STATE_CHANGED:
|
| var state = getNumberAttr(message, 'state');
|
| this.sessionState_ =
|
| - /** @type {remoting.ClientSession.State} */ state;
|
| + /** @type {remoting.ClientSession.State} */(state);
|
| this.hangoutPort_.postMessage(message);
|
| return true;
|
| }
|
| throw new Error('Unknown message method=' + message.method);
|
| - } catch(e) {
|
| - var error = /** @type {Error} */ e;
|
| + } catch(/** @type {*} */ e) {
|
| + var error = /** @type {Error} */ (e);
|
| this.sendErrorResponse_(this.webappPort_, error, message);
|
| }
|
| return false;
|
|
|