Bug 89959 - Change return type in bandwidth attribute of network information API
Summary: Change return type in bandwidth attribute of network information API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks: 89870
  Show dependency treegraph
 
Reported: 2012-06-26 01:57 PDT by Gyuyoung Kim
Modified: 2012-06-26 19:11 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.03 KB, patch)
2012-06-26 02:00 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (9.94 KB, patch)
2012-06-26 17:04 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2012-06-26 01:57:02 PDT
According to network information API spec, bandwidth attribute should return double type. But, existing implementation has used *long* and *unsigned int* types.
Comment 1 Gyuyoung Kim 2012-06-26 02:00:23 PDT
Created attachment 149486 [details]
Patch
Comment 2 Gyuyoung Kim 2012-06-26 02:10:48 PDT
CC'ing Adam.
Comment 3 Chris Dumez 2012-06-26 04:13:46 PDT
Comment on attachment 149486 [details]
Patch

LGTM.
Comment 4 Adam Barth 2012-06-26 11:05:45 PDT
Comment on attachment 149486 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=149486&action=review

> Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp:95
> -    return bandwidth / 8; // MB/s
> +    return static_cast<double>(bandwidth / 8); // MB/s

This static_cast shouldn't be needed.
Comment 5 Gyuyoung Kim 2012-06-26 17:04:15 PDT
Created attachment 149637 [details]
Patch
Comment 6 Gyuyoung Kim 2012-06-26 17:05:31 PDT
(In reply to comment #4)
> (From update of attachment 149486 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=149486&action=review
> 
> > Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp:95
> > -    return bandwidth / 8; // MB/s
> > +    return static_cast<double>(bandwidth / 8); // MB/s
> 
> This static_cast shouldn't be needed.

I fix it. Thanks.
Comment 7 WebKit Review Bot 2012-06-26 19:11:31 PDT
Comment on attachment 149637 [details]
Patch

Clearing flags on attachment: 149637

Committed r121312: <http://trac.webkit.org/changeset/121312>
Comment 8 WebKit Review Bot 2012-06-26 19:11:37 PDT
All reviewed patches have been landed.  Closing bug.