Closed Bug 986974 Opened 12 years ago Closed 4 years ago

do_QueryInterface abuse in MediaManager.cpp

Categories

(Core :: WebRTC: Audio/Video, task, P1)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: neil, Assigned: karlt)

References

Details

Attachments

(1 file)

The code mVideoDevice = do_QueryObject((*sources)[0]); or its equivalent which also appears in MediaManager.cpp is an abuse of do_QueryObject, since MediaDevice does not have an IID, so what happens is that (*sources)[0] gets reinterpreted as a MediaDevice*. SourceSet should probably be changed to be an nsTArray<nsRefPtr<MediaDevice> >.
Blocks: 514280
> SourceSet should probably be changed to be an nsTArray<nsRefPtr<MediaDevice> >. That's not going to work now because as of bug 907352 mVideoDevice and mAudioDevice are now different types.
Cleaning up Device Interfaces component, and mass-marking old FxOS bugs as incomplete. If any of these bugs are still valid, please let me know.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Assignee: nobody → karlt
Severity: normal → N/A
Status: RESOLVED → REOPENED
Type: defect → task
Component: DOM: Device Interfaces → WebRTC: Audio/Video
Priority: -- → P1
Resolution: INCOMPLETE → ---

This has been unnecessary since the nsIMediaDevice intermediate pointer type
was removed in https://hg.mozilla.org/mozilla-central/rev/d48c270e62c9#l1.197.

Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0c6e5bcb9186 remove unused support for QueryObject to MediaDevice r=jib
Status: REOPENED → RESOLVED
Closed: 8 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: