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

Side by Side Diff: remoting/webapp/crd/js/xmpp_connection.js

Issue 870823002: Fix assert in remoting.XmppConnection (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** 10 /**
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 319
320 // Once fake SSL handshake is finished pass the data to the login handler. 320 // Once fake SSL handshake is finished pass the data to the login handler.
321 if (!this.fakeSslHandshake_ && data.byteLength > 0) { 321 if (!this.fakeSslHandshake_ && data.byteLength > 0) {
322 this.loginHandler_.onDataReceived(data); 322 this.loginHandler_.onDataReceived(data);
323 } 323 }
324 } else if (this.state_ == remoting.SignalStrategy.State.CONNECTED) { 324 } else if (this.state_ == remoting.SignalStrategy.State.CONNECTED) {
325 this.streamParser_.appendData(readInfo.data); 325 this.streamParser_.appendData(readInfo.data);
326 } 326 }
327 327
328 if (!this.startTlsPending_) { 328 if (!this.startTlsPending_ &&
329 this.state_ != remoting.SignalStrategy.State.CLOSED) {
329 this.tryRead_(); 330 this.tryRead_();
330 } 331 }
331 }; 332 };
332 333
333 /** 334 /**
334 * @param {string} text 335 * @param {string} text
335 * @private 336 * @private
336 */ 337 */
337 remoting.XmppConnection.prototype.sendString_ = function(text) { 338 remoting.XmppConnection.prototype.sendString_ = function(text) {
338 this.sendBuffer_(base.encodeUtf8(text)); 339 this.sendBuffer_(base.encodeUtf8(text));
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 /** 481 /**
481 * @param {remoting.SignalStrategy.State} newState 482 * @param {remoting.SignalStrategy.State} newState
482 * @private 483 * @private
483 */ 484 */
484 remoting.XmppConnection.prototype.setState_ = function(newState) { 485 remoting.XmppConnection.prototype.setState_ = function(newState) {
485 if (this.state_ != newState) { 486 if (this.state_ != newState) {
486 this.state_ = newState; 487 this.state_ = newState;
487 this.onStateChangedCallback_(this.state_); 488 this.onStateChangedCallback_(this.state_);
488 } 489 }
489 }; 490 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698