Bug 1361475 - Remove proprietary constructor on AudioContext. r=baku

This was used only for B2G, was proprietary, and is causing issues, because
`AudioContext` can now have a parameter that is a property bag, per spec
(although we haven't implemented it at the moment).

MozReview-Commit-ID: 6LOlNp0cbfV

--HG--
extra : rebase_source : 48aa342213dba201c1062a08c7453acd16b8baea
This commit is contained in:
Paul Adenot 2017-05-04 13:43:14 +02:00
Родитель 134de88706
Коммит 16a32f974b
5 изменённых файлов: 4 добавлений и 34 удалений

Просмотреть файл

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
var htmlAudio = new Audio(URL.createObjectURL(new window.MediaSource()));
(new window.AudioContext("ringer")).createMediaElementSource(htmlAudio);
(new window.AudioContext("alarm")).createMediaElementSource(htmlAudio);
</script>
</head>
</html>

Просмотреть файл

@ -81,8 +81,6 @@ load 1157994.html
load 1158427.html
load 1185176.html
load 1185192.html
load 1223670.html
load 1228484.html
load 1304948.html
load 1319486.html
load 1291702.html

Просмотреть файл

@ -197,16 +197,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) {
@ -214,7 +204,9 @@ 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;

Просмотреть файл

@ -154,12 +154,6 @@ public:
static already_AddRefed<AudioContext>
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
// Constructor for regular AudioContext. A default audio channel is needed.
static already_AddRefed<AudioContext>
Constructor(const GlobalObject& aGlobal,
AudioChannel aChannel,
ErrorResult& aRv);
// Constructor for offline AudioContext
static already_AddRefed<AudioContext>
Constructor(const GlobalObject& aGlobal,

Просмотреть файл

@ -11,7 +11,6 @@
*/
[Constructor,
Constructor(AudioChannel audioChannelType),
Pref="dom.webaudio.enabled"]
interface AudioContext : BaseAudioContext {