mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 4861deb41e66 (bug 1116202) because of test failures
This commit is contained in:
parent
cc94c3d7c5
commit
839f06ca25
@ -38,7 +38,6 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "AudioStream.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/Services.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -67,8 +66,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
NS_IMPL_ADDREF_INHERITED(AudioContext, DOMEventTargetHelper)
|
||||
NS_IMPL_RELEASE_INHERITED(AudioContext, DOMEventTargetHelper)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioContext)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMemoryReporter)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
|
||||
|
||||
static float GetSampleRateForAudioContext(bool aIsOffline, float aSampleRate)
|
||||
@ -106,12 +103,6 @@ AudioContext::AudioContext(nsPIDOMWindow* aWindow,
|
||||
// call them after mDestination has been set up.
|
||||
mDestination->CreateAudioChannelAgent();
|
||||
mDestination->SetIsOnlyNodeForContext(true);
|
||||
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
if (observerService) {
|
||||
observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||
}
|
||||
}
|
||||
|
||||
AudioContext::~AudioContext()
|
||||
@ -732,24 +723,5 @@ AudioContext::ExtraCurrentTime() const
|
||||
return mDestination->ExtraCurrentTime();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AudioContext::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
if (mDestination) {
|
||||
// Free up the destination node stream now, in order to avoid having to
|
||||
// wait for the final CC to do it for us.
|
||||
mDestination->DestroyMediaStream();
|
||||
}
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
if (observerService) {
|
||||
observerService->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "nsTHashtable.h"
|
||||
#include "js/TypeDecls.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsIObserver.h"
|
||||
|
||||
// X11 has a #define for CurrentTime. Unbelievable :-(.
|
||||
// See dom/media/DOMMediaStream.h for more fun!
|
||||
@ -66,8 +65,7 @@ class PeriodicWave;
|
||||
class Promise;
|
||||
|
||||
class AudioContext MOZ_FINAL : public DOMEventTargetHelper,
|
||||
public nsIMemoryReporter,
|
||||
public nsIObserver
|
||||
public nsIMemoryReporter
|
||||
{
|
||||
AudioContext(nsPIDOMWindow* aParentWindow,
|
||||
bool aIsOffline,
|
||||
@ -266,8 +264,6 @@ private:
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE;
|
||||
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
friend struct ::mozilla::WebAudioDecodeJob;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user