Backout 39fe6a5577d7, bustage
authorAnant Narayanan <anant@kix.in>
Wed, 11 Jul 2012 21:43:24 -0700
changeset 101751 f22ca97a03ea9b4d6c2582afdae19237c0027daf
parent 101750 21c98ae5fc4251053e809bef5633c4b2ec8ef76e
child 101752 0bdcca132fcfae5b7ec75679cb57224e705201e5
push id1729
push userlsblakk@mozilla.com
push dateMon, 16 Jul 2012 20:02:43 +0000
treeherdermozilla-aurora@f4e75e148951 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone16.0a1
backs out39fe6a5577d72c20fd7e1e5963be67271a22384b
Backout 39fe6a5577d7, bustage
dom/media/MediaManager.cpp
dom/media/MediaManager.h
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -107,23 +107,16 @@ public:
   ~GetUserMediaStreamRunnable() {}
 
   NS_IMETHOD
   Run()
   {
     // 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).
     GetUserMediaCallbackMediaStreamListener* listener =
       new GetUserMediaCallbackMediaStreamListener(mSource, stream, mTrackID);
     stream->GetStream()->AddListener(listener);
 
     // No need for locking because we always do this in the main thread.
@@ -352,17 +345,17 @@ MediaManager::GetUserMedia(nsPIDOMWindow
 {
   NS_ENSURE_TRUE(aParams, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(aWindow, NS_ERROR_NULL_POINTER);
 
   bool audio, video, picture;
 
   nsresult rv = aParams->GetPicture(&picture);
   NS_ENSURE_SUCCESS(rv, rv);
-
+  
   /**
    * If we were asked to get a picture, before getting a snapshot, we check if
    * the calling page is allowed to open a popup. We do this because
    * {picture:true} will open a new "window" to let the user preview or select
    * an image, on Android. The desktop UI for {picture:true} is TBD, at which
    * may point we can decide whether to extend this test there as well.
    */
 #if !defined(XP_WIN) && !defined(XP_UNIX)
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaEngine.h"
 #include "mozilla/Services.h"
 
 #include "nsHashKeys.h"
-#include "nsGlobalWindow.h"
 #include "nsClassHashtable.h"
 #include "nsObserverService.h"
 
 #include "nsPIDOMWindow.h"
 #include "nsIDOMNavigatorUserMedia.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {