From 16a32f974b037ebdfab9d8b687f2256ccc641e6b Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Thu, 4 May 2017 13:43:14 +0200 Subject: [PATCH] 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 --- dom/media/test/crashtests/1228484.html | 13 ------------- dom/media/test/crashtests/crashtests.list | 2 -- dom/media/webaudio/AudioContext.cpp | 14 +++----------- dom/media/webaudio/AudioContext.h | 6 ------ dom/webidl/AudioContext.webidl | 3 +-- 5 files changed, 4 insertions(+), 34 deletions(-) delete mode 100644 dom/media/test/crashtests/1228484.html diff --git a/dom/media/test/crashtests/1228484.html b/dom/media/test/crashtests/1228484.html deleted file mode 100644 index 2b2e9b0f9e89..000000000000 --- a/dom/media/test/crashtests/1228484.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/dom/media/test/crashtests/crashtests.list b/dom/media/test/crashtests/crashtests.list index f194139482ce..a8f02261bf9c 100644 --- a/dom/media/test/crashtests/crashtests.list +++ b/dom/media/test/crashtests/crashtests.list @@ -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 diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp index 31a825f257f1..b1ef14fb532d 100644 --- a/dom/media/webaudio/AudioContext.cpp +++ b/dom/media/webaudio/AudioContext.cpp @@ -197,16 +197,6 @@ AudioContext::WrapObject(JSContext* aCx, JS::Handle aGivenProto) /* static */ already_AddRefed AudioContext::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv) -{ - return AudioContext::Constructor(aGlobal, - AudioChannelService::GetDefaultAudioChannel(), - aRv); -} - -/* static */ already_AddRefed -AudioContext::Constructor(const GlobalObject& aGlobal, - AudioChannel aChannel, - ErrorResult& aRv) { nsCOMPtr window = do_QueryInterface(aGlobal.GetAsSupports()); if (!window) { @@ -214,7 +204,9 @@ AudioContext::Constructor(const GlobalObject& aGlobal, return nullptr; } - RefPtr object = new AudioContext(window, false, aChannel); + RefPtr object = + new AudioContext(window, false, + AudioChannelService::GetDefaultAudioChannel()); aRv = object->Init(); if (NS_WARN_IF(aRv.Failed())) { return nullptr; diff --git a/dom/media/webaudio/AudioContext.h b/dom/media/webaudio/AudioContext.h index 64d2e3577905..be927461e634 100644 --- a/dom/media/webaudio/AudioContext.h +++ b/dom/media/webaudio/AudioContext.h @@ -154,12 +154,6 @@ public: static already_AddRefed Constructor(const GlobalObject& aGlobal, ErrorResult& aRv); - // Constructor for regular AudioContext. A default audio channel is needed. - static already_AddRefed - Constructor(const GlobalObject& aGlobal, - AudioChannel aChannel, - ErrorResult& aRv); - // Constructor for offline AudioContext static already_AddRefed Constructor(const GlobalObject& aGlobal, diff --git a/dom/webidl/AudioContext.webidl b/dom/webidl/AudioContext.webidl index 72e3aabb87da..8d564d54d8d6 100644 --- a/dom/webidl/AudioContext.webidl +++ b/dom/webidl/AudioContext.webidl @@ -11,7 +11,6 @@ */ [Constructor, - Constructor(AudioChannel audioChannelType), Pref="dom.webaudio.enabled"] interface AudioContext : BaseAudioContext { @@ -33,4 +32,4 @@ interface AudioContext : BaseAudioContext { [NewObject, Throws] MediaStreamAudioDestinationNode createMediaStreamDestination(); -}; \ No newline at end of file +};