Speech JavaScript API: Don't dispatch end event after ActiveDOMObject::stop()
authorhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 16:52:40 +0000 (16:52 +0000)
committerhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 16:52:40 +0000 (16:52 +0000)
commit5bc163f45aee355ffe31c8a42b3523d306255f0c
tree90e843a4e8e9e7e9ac2f74925fdda1882a687365
parent86bc4583af885126b251933f9a2a9f58f6dbfd75
Speech JavaScript API: Don't dispatch end event after ActiveDOMObject::stop()
https://bugs.webkit.org/show_bug.cgi?id=90176

Reviewed by Adam Barth.

Source/WebCore:

It is probably not safe to dispatch an event on an object that has
been ActiveDOMObject::stop()'ed.

This used to happen in the navigate-away.html test, which I believe
then caused speechgrammar-basics.html (which was typically run
afterwards, by the same worker), to crash flakily. See Bug 89717.

Test: speechgrammar-basics.html should no longer be flaky.

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::didEnd):
(WebCore::SpeechRecognition::stop):
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/speech/SpeechRecognition.h:

LayoutTests:

speechgrammar-basics.html should no longer be flaky.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/speech/SpeechRecognition.cpp
Source/WebCore/Modules/speech/SpeechRecognition.h