Commit fb38c564 authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Make RTC encoded frames serializable by default

Insertable Streams and Transferable Streams are shipping by default,
but the ability to use them together (serialization of RTC encoded
frames) was still behind a flag.
This CL removes this restriction.
The flag is currently reserved for the legacy version of the API
and will be removed in M89. Serialization is part of the released API.

Bug: 1142519
Change-Id: I64dcdb0b0974c9a582d79f604a01c73925f8e3d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2498491
Auto-Submit: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820919}
parent 90a36869
......@@ -383,11 +383,6 @@ V8ScriptValueDeserializerForModules::ReadNativeFileSystemHandle(
RTCEncodedAudioFrame*
V8ScriptValueDeserializerForModules::ReadRTCEncodedAudioFrame() {
if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
ExecutionContext::From(GetScriptState()))) {
return nullptr;
}
uint32_t index;
if (!ReadUint32(&index))
return nullptr;
......@@ -407,11 +402,6 @@ V8ScriptValueDeserializerForModules::ReadRTCEncodedAudioFrame() {
RTCEncodedVideoFrame*
V8ScriptValueDeserializerForModules::ReadRTCEncodedVideoFrame() {
if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
ExecutionContext::From(GetScriptState()))) {
return nullptr;
}
uint32_t index;
if (!ReadUint32(&index))
return nullptr;
......
......@@ -83,9 +83,7 @@ bool V8ScriptValueSerializerForModules::WriteDOMObject(
WriteUTF8String(pem.certificate().c_str());
return true;
}
if (wrapper_type_info == V8RTCEncodedAudioFrame::GetWrapperTypeInfo() &&
RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
ExecutionContext::From(GetScriptState()))) {
if (wrapper_type_info == V8RTCEncodedAudioFrame::GetWrapperTypeInfo()) {
if (IsForStorage()) {
exception_state.ThrowDOMException(DOMExceptionCode::kDataCloneError,
"An RTCEncodedAudioFrame cannot be "
......@@ -94,9 +92,7 @@ bool V8ScriptValueSerializerForModules::WriteDOMObject(
}
return WriteRTCEncodedAudioFrame(wrappable->ToImpl<RTCEncodedAudioFrame>());
}
if (wrapper_type_info == V8RTCEncodedVideoFrame::GetWrapperTypeInfo() &&
RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
ExecutionContext::From(GetScriptState()))) {
if (wrapper_type_info == V8RTCEncodedVideoFrame::GetWrapperTypeInfo()) {
if (IsForStorage()) {
exception_state.ThrowDOMException(DOMExceptionCode::kDataCloneError,
"An RTCEncodedVideoFrame cannot be "
......
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