New issue
Advanced search Search tips

Issue 908468 link

Starred by 1 user

Issue metadata

Status: Available
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consolidate and split up RTC[Void/SessionDescription]Request implementations

Project Member Reported by hbos@chromium.org, Nov 26

Issue description

RTCVoidRequest is used for WebRTC's async "void" requests, which is implemented for both promise-based methods and callback-based methods.

RTCSessionDescriptionRequest is likewise used for the SDP-creating methods (createOffer,createAnswer) and has both a promise and callback implementation.

There is some amount of repeated code here which should be consolidated.
As of https://chromium-review.googlesource.com/c/chromium/src/+/1349340, there is some special logic that occurs before a request is resolved/rejected, making the classes do multiple things. We should split these up into multiple classes, while still avoiding code duplication.

We can likely achieve this with some template/callback helper class that all requests inherit from, where we can isolate the operation-specific logic to the operation-specific Request implementations.
 

Sign in to add a comment