Bug 1186708 - Fix debug-only assert (crash) on advanced browserWindow constraint. r=jesup

This commit is contained in:
Jan-Ivar Bruaroey 2015-07-23 00:44:52 -04:00
parent d33a73d425
commit e515b47043

View File

@ -1683,12 +1683,12 @@ MediaManager::GetUserMedia(nsPIDOMWindow* aWindow,
if (!privileged) {
// only allow privileged content to set the window id
if (vc.mBrowserWindow.WasPassed()) {
vc.mBrowserWindow.Construct(-1);
vc.mBrowserWindow.Value() = -1;
}
if (vc.mAdvanced.WasPassed()) {
for (MediaTrackConstraintSet& cs : vc.mAdvanced.Value()) {
if (cs.mBrowserWindow.WasPassed()) {
cs.mBrowserWindow.Construct(-1);
cs.mBrowserWindow.Value() = -1;
}
}
}