Skip to content

Commit

Permalink
Backed out 4 changesets (bug 1674845) for Browser-chrome failures in …
Browse files Browse the repository at this point in the history
…toolkit/content/tests/browser/browser_findbar.js. CLOSED TREE

Backed out changeset 8f20a34998c6 (bug 1674845)
Backed out changeset 98b99d2dd52f (bug 1674845)
Backed out changeset 804d23738709 (bug 1674845)
Backed out changeset 64ca82a10039 (bug 1674845)
  • Loading branch information
dgluca committed Nov 5, 2020
1 parent 0f53e3a commit d1d71a8
Show file tree
Hide file tree
Showing 55 changed files with 217 additions and 284 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@

#include "AutoplayPolicy.h"

#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
#include "mozilla/dom/AudioContext.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/FeaturePolicyUtils.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElementBinding.h"
#include "mozilla/dom/UserActivation.h"
#include "mozilla/dom/WindowContext.h"
#include "mozilla/Logging.h"
#include "mozilla/MediaManager.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPrefs_media.h"
#include "nsContentUtils.h"
#include "nsGlobalWindowInner.h"
#include "nsIAutoplay.h"
#include "nsContentUtils.h"
#include "mozilla/dom/Document.h"
#include "MediaManager.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIPermissionManager.h"
#include "nsIPrincipal.h"
#include "nsPIDOMWindow.h"
#include "nsIPrincipal.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPrefs_media.h"
#include "nsIPermissionManager.h"

mozilla::LazyLogModule gAutoplayPermissionLog("Autoplay");

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 25 additions & 7 deletions dom/media/MediaShutdownManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
* 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 "MediaShutdownManager.h"

#include "MediaDecoder.h"
#include "mozilla/Logging.h"
#include "mozilla/media/MediaUtils.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/Services.h"

#include "MediaDecoder.h"
#include "MediaShutdownManager.h"

namespace mozilla {

Expand Down Expand Up @@ -47,6 +46,25 @@ MediaShutdownManager& MediaShutdownManager::Instance() {
return *sInstance;
}

static nsCOMPtr<nsIAsyncShutdownClient> GetShutdownBarrier() {
nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdownService();
if (!svc) {
LOGW("Failed to get shutdown service in MediaShutdownManager!");
return nullptr;
}

nsCOMPtr<nsIAsyncShutdownClient> barrier;
nsresult rv = svc->GetProfileBeforeChange(getter_AddRefs(barrier));
if (!barrier) {
// We are probably in a content process. We need to do cleanup at
// XPCOM shutdown in leakchecking builds.
rv = svc->GetXpcomWillShutdown(getter_AddRefs(barrier));
}
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
MOZ_RELEASE_ASSERT(barrier);
return barrier;
}

void MediaShutdownManager::InitStatics() {
MOZ_ASSERT(NS_IsMainThread());
if (sInitPhase != NotInited) {
Expand All @@ -56,7 +74,7 @@ void MediaShutdownManager::InitStatics() {
sInstance = new MediaShutdownManager();
MOZ_DIAGNOSTIC_ASSERT(sInstance);

nsCOMPtr<nsIAsyncShutdownClient> barrier = media::GetShutdownBarrier();
nsCOMPtr<nsIAsyncShutdownClient> barrier = GetShutdownBarrier();

if (!barrier) {
LOGW("Failed to get barrier, cannot add shutdown blocker!");
Expand All @@ -79,7 +97,7 @@ void MediaShutdownManager::RemoveBlocker() {
MOZ_ASSERT(NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT(sInitPhase == XPCOMShutdownStarted);
MOZ_ASSERT(mDecoders.Count() == 0);
nsCOMPtr<nsIAsyncShutdownClient> barrier = media::GetShutdownBarrier();
nsCOMPtr<nsIAsyncShutdownClient> barrier = GetShutdownBarrier();
// xpcom should still be available because we blocked shutdown by having a
// blocker. Until it completely shuts down we should still be able to get
// the barrier.
Expand Down
32 changes: 0 additions & 32 deletions dom/media/autoplay/moz.build

This file was deleted.

Binary file removed dom/media/autoplay/test/browser/audio.ogg
Binary file not shown.
23 changes: 0 additions & 23 deletions dom/media/autoplay/test/browser/browser.ini

This file was deleted.

8 changes: 0 additions & 8 deletions dom/media/autoplay/test/browser/file_empty.html

This file was deleted.

7 changes: 0 additions & 7 deletions dom/media/autoplay/test/browser/file_nonAutoplayAudio.html

This file was deleted.

9 changes: 0 additions & 9 deletions dom/media/autoplay/test/browser/file_video.html

This file was deleted.

105 changes: 0 additions & 105 deletions dom/media/autoplay/test/browser/head.js

This file was deleted.

54 changes: 0 additions & 54 deletions dom/media/autoplay/test/mochitest/mochitest.ini

This file was deleted.

8 changes: 7 additions & 1 deletion dom/media/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ with Files("GetUserMedia*"):
BUG_COMPONENT = component_av

DIRS += [
"autoplay",
"doctor",
"eme",
"encoder",
Expand Down Expand Up @@ -93,6 +92,7 @@ if CONFIG["MOZ_WEBRTC"]:

XPIDL_SOURCES += [
"nsIAudioDeviceInfo.idl",
"nsIAutoplay.idl",
"nsIDOMNavigatorUserMedia.idl",
"nsIMediaManager.idl",
]
Expand All @@ -119,6 +119,7 @@ EXPORTS += [
"AudioSegment.h",
"AudioStream.h",
"AudioThreadRegistry.h",
"AutoplayPolicy.h",
"BackgroundVideoDecodingPermissionObserver.h",
"Benchmark.h",
"BitReader.h",
Expand All @@ -136,6 +137,9 @@ EXPORTS += [
"FileBlockCache.h",
"ForwardedInputTrack.h",
"FrameStatistics.h",
"GVAutoplayPermissionRequest.h",
"GVAutoplayRequestStatusIPC.h",
"GVAutoplayRequestUtils.h",
"ImageToI420.h",
"Intervals.h",
"MediaCache.h",
Expand Down Expand Up @@ -243,6 +247,7 @@ UNIFIED_SOURCES += [
"AudioStreamTrack.cpp",
"AudioTrack.cpp",
"AudioTrackList.cpp",
"AutoplayPolicy.cpp",
"BackgroundVideoDecodingPermissionObserver.cpp",
"BaseMediaResource.cpp",
"Benchmark.cpp",
Expand All @@ -261,6 +266,7 @@ UNIFIED_SOURCES += [
"GetUserMediaRequest.cpp",
"GraphDriver.cpp",
"GraphRunner.cpp",
"GVAutoplayPermissionRequest.cpp",
"ImageToI420.cpp",
"MediaCache.cpp",
"MediaContainerType.cpp",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* import-globals-from ../../../test/manifest.js */
/* import-globals-from manifest.js */

function playAndPostResult(muted, parent_window) {
let element = document.createElement("video");
Expand Down
Loading

0 comments on commit d1d71a8

Please sign in to comment.