Backed out changeset 3466be6fd32c (bug 1162692) for apparently causing the gip(a) permafail on a CLOSED TREE

This commit is contained in:
Wes Kocher 2015-05-08 18:09:48 -07:00
parent e972609eb4
commit 29b725aa2c
11 changed files with 8 additions and 42 deletions

View File

@ -147,12 +147,6 @@ SpeechSynthesisUtterance::SetPitch(float aPitch)
mPitch = aPitch;
}
void
SpeechSynthesisUtterance::GetChosenVoiceURI(nsString& aResult) const
{
aResult = mChosenVoiceURI;
}
void
SpeechSynthesisUtterance::DispatchSpeechSynthesisEvent(const nsAString& aEventType,
uint32_t aCharIndex,

View File

@ -71,8 +71,6 @@ public:
void SetPitch(float aPitch);
void GetChosenVoiceURI(nsString& aResult) const;
enum {
STATE_NONE,
STATE_PENDING,
@ -109,8 +107,6 @@ private:
float mPitch;
nsString mChosenVoiceURI;
uint32_t mState;
bool mPaused;

View File

@ -25,7 +25,7 @@ async protocol PSpeechSynthesisRequest
__delete__(bool aIsError, float aElapsedTime, uint32_t aCharIndex);
OnStart(nsString aUri);
OnStart();
OnPause(float aElapsedTime, uint32_t aCharIndex);

View File

@ -73,9 +73,9 @@ SpeechSynthesisRequestChild::~SpeechSynthesisRequestChild()
}
bool
SpeechSynthesisRequestChild::RecvOnStart(const nsString& aUri)
SpeechSynthesisRequestChild::RecvOnStart()
{
mTask->DispatchStartImpl(aUri);
mTask->DispatchStartImpl();
return true;
}

View File

@ -48,7 +48,7 @@ public:
virtual ~SpeechSynthesisRequestChild();
protected:
virtual bool RecvOnStart(const nsString& aUri) override;
virtual bool RecvOnStart() override;
virtual bool Recv__delete__(const bool& aIsError,
const float& aElapsedTime,

View File

@ -120,10 +120,10 @@ SpeechSynthesisRequestParent::RecvCancel()
// SpeechTaskParent
nsresult
SpeechTaskParent::DispatchStartImpl(const nsAString& aUri)
SpeechTaskParent::DispatchStartImpl()
{
MOZ_ASSERT(mActor);
NS_ENSURE_TRUE(mActor->SendOnStart(nsString(aUri)), NS_ERROR_FAILURE);
NS_ENSURE_TRUE(mActor->SendOnStart(), NS_ERROR_FAILURE);
return NS_OK;
}

View File

@ -75,7 +75,7 @@ public:
SpeechTaskParent(float aVolume, const nsAString& aUtterance)
: nsSpeechTask(aVolume, aUtterance) {}
virtual nsresult DispatchStartImpl(const nsAString& aUri);
virtual nsresult DispatchStartImpl();
virtual nsresult DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex);

View File

@ -140,12 +140,6 @@ nsSpeechTask::BindStream(ProcessedMediaStream* aStream)
mPort = aStream->AllocateInputPort(mStream, 0);
}
void
nsSpeechTask::SetChosenVoiceURI(const nsAString& aUri)
{
mChosenVoiceURI = aUri;
}
NS_IMETHODIMP
nsSpeechTask::Setup(nsISpeechTaskCallback* aCallback,
uint32_t aChannels, uint32_t aRate, uint8_t argc)
@ -287,12 +281,6 @@ nsSpeechTask::DispatchStart()
nsresult
nsSpeechTask::DispatchStartImpl()
{
return DispatchStartImpl(mChosenVoiceURI);
}
nsresult
nsSpeechTask::DispatchStartImpl(const nsAString& aUri)
{
LOG(PR_LOG_DEBUG, ("nsSpeechTask::DispatchStart"));
@ -301,7 +289,6 @@ nsSpeechTask::DispatchStartImpl(const nsAString& aUri)
NS_ERROR_NOT_AVAILABLE);
mUtterance->mState = SpeechSynthesisUtterance::STATE_SPEAKING;
mUtterance->mChosenVoiceURI = aUri;
mUtterance->DispatchSpeechSynthesisEvent(NS_LITERAL_STRING("start"), 0, 0,
NS_LITERAL_STRING(""));

View File

@ -47,14 +47,10 @@ public:
void BindStream(ProcessedMediaStream* aStream);
void SetChosenVoiceURI(const nsAString& aUri);
protected:
virtual ~nsSpeechTask();
nsresult DispatchStartImpl();
virtual nsresult DispatchStartImpl(const nsAString& aUri);
virtual nsresult DispatchStartImpl();
virtual nsresult DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex);
@ -93,8 +89,6 @@ private:
nsRefPtr<SpeechSynthesis> mSpeechSynthesis;
bool mIndirectAudio;
nsString mChosenVoiceURI;
};
} // namespace dom

View File

@ -561,8 +561,6 @@ nsSynthVoiceRegistry::Speak(const nsAString& aText,
VoiceData* voice = FindBestMatch(aUri, aLang);
aTask->SetChosenVoiceURI(voice->mUri);
if (!voice) {
NS_WARNING("No voices found.");
aTask->DispatchError(0, 0);

View File

@ -28,7 +28,4 @@ interface SpeechSynthesisUtterance : EventTarget {
attribute EventHandler onresume;
attribute EventHandler onmark;
attribute EventHandler onboundary;
[ChromeOnly]
readonly attribute DOMString chosenVoiceURI;
};