Bug 1507580 - Remove AutoplayPermissionRequest::mMainThreadTarget since it is unused r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 19 Nov 2018 21:48:21 +0000
changeset 503601 fc843052b3fd6917e95000535c3b3f4a8e57a9d6
parent 503514 2ac85aee845090097edf39e8d468f2551fbc06bf
child 503602 0bab3d4bd3cc456f151ed490de77852b3f0aadaf
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1507580
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507580 - Remove AutoplayPermissionRequest::mMainThreadTarget since it is unused r=baku Differential Revision: https://phabricator.services.mozilla.com/D12055
dom/html/AutoplayPermissionRequest.cpp
dom/html/AutoplayPermissionRequest.h
--- a/dom/html/AutoplayPermissionRequest.cpp
+++ b/dom/html/AutoplayPermissionRequest.cpp
@@ -20,23 +20,21 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(Autop
                                    ContentPermissionRequestBase)
 
 NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(AutoplayPermissionRequest,
                                                ContentPermissionRequestBase)
 
 AutoplayPermissionRequest::AutoplayPermissionRequest(
   AutoplayPermissionManager* aManager,
   nsGlobalWindowInner* aWindow,
-  nsIPrincipal* aNodePrincipal,
-  nsIEventTarget* aMainThreadTarget)
+  nsIPrincipal* aNodePrincipal)
   : ContentPermissionRequestBase(aNodePrincipal, false, aWindow,
                                  NS_LITERAL_CSTRING(""), // No testing pref used in this class
                                  NS_LITERAL_CSTRING("autoplay-media"))
   , mManager(aManager)
-  , mMainThreadTarget(aMainThreadTarget)
 {
 }
 
 AutoplayPermissionRequest::~AutoplayPermissionRequest()
 {
   Cancel();
 }
 
@@ -63,22 +61,20 @@ AutoplayPermissionRequest::Allow(JS::Han
   }
   return NS_OK;
 }
 
 already_AddRefed<AutoplayPermissionRequest>
 AutoplayPermissionRequest::Create(nsGlobalWindowInner* aWindow,
                                   AutoplayPermissionManager* aManager)
 {
-  if (!aWindow || !aWindow->GetPrincipal() ||
-      !aWindow->EventTargetFor(TaskCategory::Other)) {
+  if (!aWindow || !aWindow->GetPrincipal()) {
     return nullptr;
   }
   RefPtr<AutoplayPermissionRequest> request =
     new AutoplayPermissionRequest(aManager,
                                   aWindow,
-                                  aWindow->GetPrincipal(),
-                                  aWindow->EventTargetFor(TaskCategory::Other));
+                                  aWindow->GetPrincipal());
   PLAY_REQUEST_LOG("AutoplayPermissionRequest %p Create()", request.get());
   return request.forget();
 }
 
 } // namespace mozilla
--- a/dom/html/AutoplayPermissionRequest.h
+++ b/dom/html/AutoplayPermissionRequest.h
@@ -40,20 +40,17 @@ public:
 
   static already_AddRefed<AutoplayPermissionRequest> Create(
     nsGlobalWindowInner* aWindow,
     AutoplayPermissionManager* aManager);
 
 private:
   AutoplayPermissionRequest(AutoplayPermissionManager* aManager,
                             nsGlobalWindowInner* aWindow,
-                            nsIPrincipal* aNodePrincipal,
-                            nsIEventTarget* aMainThreadTarget);
+                            nsIPrincipal* aNodePrincipal);
   ~AutoplayPermissionRequest();
 
   WeakPtr<AutoplayPermissionManager> mManager;
-
-  nsCOMPtr<nsIEventTarget> mMainThreadTarget;
 };
 
 } // namespace mozilla
 
 #endif // AutoplayPermissionRequest_h_