New issue
Advanced search Search tips

Issue 613317 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[WebApp Client] remoting.ClientSession.PerfStats has undefined fields when the connection just starts

Project Member Reported by yuweih@chromium.org, May 19 2016

Issue description

remoting.ClientSession.PerfStats has undefined fields when the connection just starts. All these fields are marked as number type but JSCompiler will not complain when the code doesn't do null check.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bab89783f15ddb0fedb0a8f5ff03e3e696b2f2af

commit bab89783f15ddb0fedb0a8f5ff03e3e696b2f2af
Author: yuweih <yuweih@chromium.org>
Date: Mon May 23 20:49:47 2016

* Initialize remoting.ClientSession.PerfStats with zeros so that caller doesn't need to check the undefined case.
* Add check to StatsAccumulator.Add so that initial zeros will not dilute the result.

BUG= 613317 

Review-Url: https://codereview.chromium.org/2004673002
Cr-Commit-Position: refs/heads/master@{#395408}

[modify] https://crrev.com/bab89783f15ddb0fedb0a8f5ff03e3e696b2f2af/remoting/webapp/base/js/client_session.js
[modify] https://crrev.com/bab89783f15ddb0fedb0a8f5ff03e3e696b2f2af/remoting/webapp/base/js/connection_stats.js
[modify] https://crrev.com/bab89783f15ddb0fedb0a8f5ff03e3e696b2f2af/remoting/webapp/base/js/stats_accumulator.js

Comment 2 by yuweih@chromium.org, May 24 2016

Status: Fixed (was: Assigned)

Sign in to add a comment