These parameters are nullable in the JS API.
This allows cleaner handling of "unset" vs "set" in Chrome.
Backwards compatibility note: Behavior should not change, even for users
who set the values explicitly to -1 in the DataChannelInit struct.
Those who try to read back the value will get a compile-time error.
Bug: chromium:854385
Change-Id: Ib488ca5f70bc24ba8b4a3f71b506434c4d2c60b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131381
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27507}
Call DataChannelObserver::OnBufferedAmountChange on each successful send.
Previously, the observer would get notified of buffered amount changes only when
queued send data is consumed. Data gets queued only if it cannot be sent right
away. According to the WebRTC standard[1], bufferedamount should be increased
before each sent and decreased after each successful sent. Update implementation
to be standard compliant.
Design doc: http://doc/1lorHBn-GMn5U0T0RQANxrsW0pXhw8XGZM-xZyVUOW90
[1] https://w3c.github.io/webrtc-pc/#dom-datachannel-bufferedamount
Bug: chromium:878682
Change-Id: Ife009d30c4a18dced9a54cf600a445bb1f02561d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123237
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27057}