Remove proprietary constructor on AudioContext.

This is a B2G leftover, was proprietary, and is causing issues
because `AudioContext` can now have a parameter that is a property bag,
per spec (we do not do anything with the property bag now; the audio
back-end will use automatic values for everything).

This resolves #924.
This commit is contained in:
wolfbeast 2019-01-04 16:18:03 +01:00 committed by Roy Tam
commit a0d362b6e3
5 changed files with 1 additions and 33 deletions

View file

@ -178,16 +178,6 @@ AudioContext::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
/* static */ already_AddRefed<AudioContext>
AudioContext::Constructor(const GlobalObject& aGlobal,
ErrorResult& aRv)
{
return AudioContext::Constructor(aGlobal,
AudioChannelService::GetDefaultAudioChannel(),
aRv);
}
/* static */ already_AddRefed<AudioContext>
AudioContext::Constructor(const GlobalObject& aGlobal,
AudioChannel aChannel,
ErrorResult& aRv)
{
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal.GetAsSupports());
if (!window) {
@ -195,7 +185,7 @@ AudioContext::Constructor(const GlobalObject& aGlobal,
return nullptr;
}
RefPtr<AudioContext> object = new AudioContext(window, false, aChannel);
RefPtr<AudioContext> object = new AudioContext(window, false, AudioChannelService::GetDefaultAudioChannel());
aRv = object->Init();
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;