Commit 28709494 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

RTCDataChannelInit: Remove maxRetransmissionTime

This has been announced as "will be removed in M70" for many versions.
This CL actually removes them.

Usage is negligible.

Bug: 854385
Change-Id: I6af1279978de669e433fa5eb6e0b62dfd348b8bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713539Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680411}
parent ee7f7fd3
......@@ -513,11 +513,6 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
"Creating a MediaStreamAudioSourceNode on an OfflineAudioContext",
kM71, "5258622686724096")};
case WebFeature::kRTCDataChannelInitMaxRetransmitTime:
return {"RTCDataChannelInitMaxRetransmitTime", kM70,
ReplacedWillBeRemoved("maxRetransmitTime", "maxPacketLifeTime",
kM70, "5198350873788416")};
case WebFeature::kGridRowTrackPercentIndefiniteHeight:
return {"GridRowTrackPercentIndefiniteHeight", kM70,
String::Format("Percentages row tracks and gutters for "
......
......@@ -6,10 +6,6 @@
dictionary RTCDataChannelInit {
boolean ordered = true;
// TODO(crbug.com/696681): Deprecate maxRetransmitTime in favor of
// maxPacketLifeTime (they're the same thing, maxRetransmitTime is just the
// older name)
unsigned short maxRetransmitTime;
unsigned short maxPacketLifeTime;
unsigned short maxRetransmits;
USVString protocol = "";
......
......@@ -2298,20 +2298,11 @@ RTCDataChannel* RTCPeerConnection::createDataChannel(
WebRTCDataChannelInit init;
init.ordered = data_channel_dict->ordered();
ExecutionContext* context = ExecutionContext::From(script_state);
// maxPacketLifeTime and maxRetransmitTime are two names for the same thing,
// but maxPacketLifeTime is the standardized name so it takes precedence.
if (data_channel_dict->hasMaxPacketLifeTime()) {
UseCounter::Count(
context,
WebFeature::kRTCPeerConnectionCreateDataChannelMaxPacketLifeTime);
init.max_retransmit_time = data_channel_dict->maxPacketLifeTime();
} else if (data_channel_dict->hasMaxRetransmitTime()) {
Deprecation::CountDeprecation(
context, WebFeature::kRTCDataChannelInitMaxRetransmitTime);
UseCounter::Count(
context,
WebFeature::kRTCPeerConnectionCreateDataChannelMaxRetransmitTime);
init.max_retransmit_time = data_channel_dict->maxRetransmitTime();
}
if (data_channel_dict->hasMaxRetransmits()) {
UseCounter::Count(
......
CONSOLE WARNING: maxRetransmitTime is deprecated and will be removed in M70, around October 2018. Please use maxPacketLifeTime instead. See https://www.chromestatus.com/features/5198350873788416 for more details.
Tests RTCDataChannel.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......@@ -14,8 +13,10 @@ PASS dc.reliable is true
PASS dc.ordered is false
PASS dc = pc.createDataChannel("label3", {maxRetransmits:0}); did not throw exception.
PASS dc.reliable is false
PASS dc = pc.createDataChannel("label3", {maxRetransmitTime:0}); did not throw exception.
PASS dc = pc.createDataChannel("label3", {maxPacketLifeTime:0}); did not throw exception.
PASS dc.reliable is false
PASS dc = pc.createDataChannel("label3", {maxRetransmitTime:0}); did not throw exception.
PASS dc.reliable is true
PASS dc = pc.createDataChannel("label"); did not throw exception.
PASS dc.readyState is 'connecting'
PASS pc is connected
......
......@@ -141,8 +141,11 @@ shouldBe("dc.reliable", "true");
shouldBe("dc.ordered", "false");
shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmits:0});');
shouldBe("dc.reliable", "false");
shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmitTime:0});');
shouldNotThrow('dc = pc.createDataChannel("label3", {maxPacketLifeTime:0});');
shouldBe("dc.reliable", "false");
// Test that older name has stopped affecting the reliability mode.
shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmitTime:0});');
shouldBe("dc.reliable", "true");
pc = new RTCPeerConnection();
pc2 = new RTCPeerConnection();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment