Closed Bug 986974 Opened 6 years ago Closed 2 years ago

do_QueryInterface abuse in MediaManager.cpp

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: neil, Unassigned)

References

Details

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: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.