mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 771833: Assign an nsIPrincipal to media streams returned by getUserMedia; r=roc
This commit is contained in:
parent
9e902cd6a9
commit
49cb4ef18b
@ -112,6 +112,13 @@ public:
|
||||
// Create a media stream.
|
||||
nsCOMPtr<nsDOMMediaStream> stream = nsDOMMediaStream::CreateInputStream();
|
||||
|
||||
nsPIDOMWindow *window = static_cast<nsPIDOMWindow*>
|
||||
(nsGlobalWindow::GetOuterWindowWithId(mWindowID));
|
||||
|
||||
if (window && window->GetExtantDoc()) {
|
||||
stream->CombineWithPrincipal(window->GetExtantDoc()->NodePrincipal());
|
||||
}
|
||||
|
||||
// Add our listener. We'll call Start() on the source when get a callback
|
||||
// that the MediaStream has started consuming. The listener is freed
|
||||
// when the page is invalidated (on navigation or close).
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "mozilla/Services.h"
|
||||
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsClassHashtable.h"
|
||||
#include "nsObserverService.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user