Bug 1413098 - Part 4 - Rename variable and reorder argument to remove default argument value. r=pehrsons

MozReview-Commit-ID: CGrHExujtZ1

--HG--
extra : rebase_source : a12632d384ce175b34b8ba987ca49ec96fbb7a1f
extra : source : b12730d42016a38c7869dfc50a4646198c9002df
This commit is contained in:
Paul Adenot 2018-02-26 15:02:45 +01:00
Родитель 9d1dd3cd23
Коммит c2e2a570a5
3 изменённых файлов: 11 добавлений и 10 удалений

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

@ -153,12 +153,13 @@ AudioContext::AudioContext(nsPIDOMWindowInner* aWindow,
// Note: AudioDestinationNode needs an AudioContext that must already be
// bound to the window.
bool allowToStart = AutoplayPolicy::IsAudioContextAllowedToPlay(WrapNotNull(this));
mDestination = new AudioDestinationNode(this, aIsOffline,
bool allowedToStart = AutoplayPolicy::IsAudioContextAllowedToPlay(WrapNotNull(this));
mDestination = new AudioDestinationNode(this,
aIsOffline,
allowedToStart,
aNumberOfChannels,
aLength,
aSampleRate,
allowToStart);
aSampleRate);
// The context can't be muted until it has a destination.
if (mute) {
@ -167,7 +168,7 @@ AudioContext::AudioContext(nsPIDOMWindowInner* aWindow,
// If we won't allow audio context to start, we need to suspend all its stream
// in order to delay the state changing from 'suspend' to 'start'.
if (!allowToStart) {
if (!allowedToStart) {
ErrorResult rv;
RefPtr<Promise> dummy = Suspend(rv);
MOZ_ASSERT(!rv.Failed(), "can't create promise");

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

@ -323,10 +323,10 @@ NS_IMPL_RELEASE_INHERITED(AudioDestinationNode, AudioNode)
AudioDestinationNode::AudioDestinationNode(AudioContext* aContext,
bool aIsOffline,
bool aAllowedToStart,
uint32_t aNumberOfChannels,
uint32_t aLength,
float aSampleRate,
bool aAllowToStart)
float aSampleRate)
: AudioNode(aContext, aNumberOfChannels,
ChannelCountMode::Explicit, ChannelInterpretation::Speakers)
, mFramesToProduce(aLength)
@ -354,7 +354,7 @@ AudioDestinationNode::AudioDestinationNode(AudioContext* aContext,
mStream->AddMainThreadListener(this);
mStream->AddAudioOutput(&gWebAudioOutputKey);
if (!aIsOffline && aAllowToStart) {
if (!aIsOffline && aAllowedToStart) {
graph->NotifyWhenGraphStarted(mStream);
}
}

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

@ -25,10 +25,10 @@ public:
// whether it's in offline mode.
AudioDestinationNode(AudioContext* aContext,
bool aIsOffline,
bool aAllowedToStart,
uint32_t aNumberOfChannels = 0,
uint32_t aLength = 0,
float aSampleRate = 0.0f,
bool aAllowToStart = true);
float aSampleRate = 0.0f);
void DestroyMediaStream() override;