Bug 1208371 - Remove CORSMode methods from DOMMediaStream. r?mt
MozReview-Commit-ID: KiJPucdErFV
--- a/dom/media/DOMMediaStream.cpp
+++ b/dom/media/DOMMediaStream.cpp
@@ -326,17 +326,17 @@ NS_IMPL_RELEASE_INHERITED(DOMAudioNodeMe
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMAudioNodeMediaStream)
NS_INTERFACE_MAP_END_INHERITING(DOMMediaStream)
DOMMediaStream::DOMMediaStream(nsPIDOMWindowInner* aWindow,
MediaStreamTrackSourceGetter* aTrackSourceGetter)
: mLogicalStreamStartTime(0), mWindow(aWindow),
mInputStream(nullptr), mOwnedStream(nullptr), mPlaybackStream(nullptr),
mTrackSourceGetter(aTrackSourceGetter), mTracksCreated(false),
- mNotifiedOfMediaStreamGraphShutdown(false), mCORSMode(CORS_NONE)
+ mNotifiedOfMediaStreamGraphShutdown(false)
{
nsresult rv;
nsCOMPtr<nsIUUIDGenerator> uuidgen =
do_GetService("@mozilla.org/uuid-generator;1", &rv);
if (NS_SUCCEEDED(rv) && uuidgen) {
nsID uuid;
memset(&uuid, 0, sizeof(uuid));
@@ -881,30 +881,16 @@ DOMMediaStream::RecomputePrincipal()
info->GetTrack()->GetPrincipal());
}
if (previousPrincipal != mPrincipal) {
NotifyPrincipalChanged();
}
}
void
-DOMMediaStream::SetCORSMode(CORSMode aCORSMode)
-{
- MOZ_ASSERT(NS_IsMainThread());
- mCORSMode = aCORSMode;
-}
-
-CORSMode
-DOMMediaStream::GetCORSMode()
-{
- MOZ_ASSERT(NS_IsMainThread());
- return mCORSMode;
-}
-
-void
DOMMediaStream::NotifyPrincipalChanged()
{
if (!mPrincipal) {
// When all tracks are removed, mPrincipal will change to nullptr.
LOG(LogLevel::Info, ("DOMMediaStream %p Principal changed to nothing.",
this));
} else {
LOG(LogLevel::Info, ("DOMMediaStream %p Principal changed. Now: "
--- a/dom/media/DOMMediaStream.h
+++ b/dom/media/DOMMediaStream.h
@@ -10,17 +10,16 @@
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
#include "StreamBuffer.h"
#include "nsIDOMWindow.h"
#include "nsIPrincipal.h"
#include "mozilla/PeerIdentity.h"
#include "mozilla/DOMEventTargetHelper.h"
-#include "mozilla/CORSMode.h"
#include "PrincipalChangeObserver.h"
// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
// GetTickCount() and conflicts with NS_DECL_NSIDOMMEDIASTREAM, containing
// currentTime getter.
#ifdef GetCurrentTime
#undef GetCurrentTime
#endif
@@ -440,18 +439,16 @@ public:
virtual DOMHwMediaStream* AsDOMHwMediaStream() { return nullptr; }
bool IsFinished();
/**
* Returns a principal indicating who may access this stream. The stream contents
* can only be accessed by principals subsuming this principal.
*/
nsIPrincipal* GetPrincipal() { return mPrincipal; }
- mozilla::CORSMode GetCORSMode();
- void SetCORSMode(mozilla::CORSMode aCORSMode);
/**
* These are used in WebRTC. A peerIdentity constrained MediaStream cannot be sent
* across the network to anything other than a peer with the provided identity.
* If this is set, then mPrincipal should be an instance of nsNullPrincipal.
*/
PeerIdentity* GetPeerIdentity() const { return mPeerIdentity; }
void SetPeerIdentity(PeerIdentity* aPeerIdentity)