Closed Bug 1811836 Opened 3 years ago Closed 1 year ago

Look into simplifying RFP check in MediaDevices::OnDeviceChange

Categories

(Core :: WebRTC: Audio/Video, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: tschuster, Assigned: fkilic)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fpp:m?])

Attachments

(1 file)

Right now MediaDevices::OnDeviceChange calls ShouldResistFingerprinting with a justification, but I am wondering if we could change this code now that checking ShouldResistFingerprinting() on windows is fast.

I am a bit hesitant, because the code seems quite complicated. However after we pass the RFP check we set mHaveUnprocessedDeviceListChange and call MaybeResumeDeviceExposure and that function requires GetOwner to return a non-null value. Could we move the RFP check into that function?

Or is mHaveUnprocessedDeviceListChange actually some kind of way of retrying that function when we don't have a window?

FWIW The efficiency check isn't so much because ShouldRFP is fast, but because there's all that other stuff I wanted to guard. Bug 1721840 had similar code that had showed up in hangstats, so I think I was being similarly conservative.

Whiteboard: [fpp:m?]
Assignee: nobody → fkilic
Status: NEW → ASSIGNED
Pushed by fkilic@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/827061454ed8 Move devicechange rfp check from OnDeviceChange to MaybeResumeDeviceExposure where we always have window. r=tjr
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: