Bug 167571 - [WebRTC] RTCPeerConnection should reject getStats promise in closed state
Summary: [WebRTC] RTCPeerConnection should reject getStats promise in closed state
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks: 143211
  Show dependency treegraph
 
Reported: 2017-01-29 21:32 PST by youenn fablet
Modified: 2017-08-29 15:43 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.95 KB, patch)
2017-01-29 21:34 PST, youenn fablet
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-01-29 21:32:55 PST
RTCPeerConnection should reject getStats promise in closed mode
Comment 1 youenn fablet 2017-01-29 21:34:37 PST
Created attachment 300085 [details]
Patch
Comment 2 Alex Christensen 2017-01-30 15:37:34 PST
Comment on attachment 300085 [details]
Patch

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

> Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:388
> +        promise.reject(Exception { INVALID_STATE_ERR, "Cannot get stats on closed state" });

Do we need a message here? "Cannot get stats on closed state" doesn't make much sense.
Comment 3 Adam Bergkvist 2017-02-09 04:47:13 PST
The getStats() method [1] doesn't specify that it should reject on closed state. I believe it's a feature that you should be able to extract the "last" stats gathered by a closed RTCPeerConnection.

[1] https://w3c.github.io/webrtc-pc/archives/20161219/webrtc.html#rtcpeerconnection-interface-extensions-2
Comment 4 Radar WebKit Bug Importer 2017-08-29 09:51:51 PDT
<rdar://problem/34134439>
Comment 5 Jon Lee 2017-08-29 15:43:59 PDT
The spec has changed since.