Title: [121438] trunk
- Revision
- 121438
- Author
- h...@chromium.org
- Date
- 2012-06-28 09:52:40 -0700 (Thu, 28 Jun 2012)
Log Message
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:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (121437 => 121438)
--- trunk/LayoutTests/ChangeLog 2012-06-28 16:43:23 UTC (rev 121437)
+++ trunk/LayoutTests/ChangeLog 2012-06-28 16:52:40 UTC (rev 121438)
@@ -1,3 +1,14 @@
+2012-06-28 Hans Wennborg <h...@chromium.org>
+
+ Speech _javascript_ API: Don't dispatch end event after ActiveDOMObject::stop()
+ https://bugs.webkit.org/show_bug.cgi?id=90176
+
+ Reviewed by Adam Barth.
+
+ speechgrammar-basics.html should no longer be flaky.
+
+ * platform/chromium/TestExpectations:
+
2012-06-28 Alexander Pavlov <apav...@chromium.org>
[Qt] inspector/styles/inject-stylesheet.html makes 4 tests flakey (TEXT PASS)
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (121437 => 121438)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-06-28 16:43:23 UTC (rev 121437)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-06-28 16:52:40 UTC (rev 121438)
@@ -3738,9 +3738,6 @@
BUGWK89702 : compositing/geometry/fixed-position-transform-composited-page-scale-down.html = PASS IMAGE
BUGWK89702 : compositing/scaling/tiled-layer-recursion.html = PASS IMAGE
-// Flaky
-BUGWK89717 : fast/speech/scripted/speechgrammar-basics.html = PASS CRASH
-
BUGWK89789 MAC : plugins/embed-attributes-style.html = PASS IMAGE
BUGWK89789 MAC : userscripts/user-script-video-document.html = PASS CRASH
Modified: trunk/Source/WebCore/ChangeLog (121437 => 121438)
--- trunk/Source/WebCore/ChangeLog 2012-06-28 16:43:23 UTC (rev 121437)
+++ trunk/Source/WebCore/ChangeLog 2012-06-28 16:52:40 UTC (rev 121438)
@@ -1,3 +1,25 @@
+2012-06-28 Hans Wennborg <h...@chromium.org>
+
+ Speech _javascript_ API: Don't dispatch end event after ActiveDOMObject::stop()
+ https://bugs.webkit.org/show_bug.cgi?id=90176
+
+ Reviewed by Adam Barth.
+
+ 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:
+
2012-06-28 Sudarsana Nagineni <sudarsana.nagin...@linux.intel.com>
[GTK] [WK2] Memory leak in ResourceHandleSoup.cpp
Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp (121437 => 121438)
--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp 2012-06-28 16:43:23 UTC (rev 121437)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp 2012-06-28 16:52:40 UTC (rev 121438)
@@ -122,7 +122,8 @@
void SpeechRecognition::didEnd()
{
- dispatchEvent(Event::create(eventNames().endEvent, /*canBubble=*/false, /*cancelable=*/false));
+ if (!m_stoppedByActiveDOMObject)
+ dispatchEvent(Event::create(eventNames().endEvent, /*canBubble=*/false, /*cancelable=*/false));
unsetPendingActivity(this);
}
@@ -138,6 +139,7 @@
void SpeechRecognition::stop()
{
+ m_stoppedByActiveDOMObject = true;
if (hasPendingActivity())
abort();
}
@@ -148,6 +150,7 @@
, m_continuous(false)
, m_maxAlternatives(1)
, m_controller(0)
+ , m_stoppedByActiveDOMObject(false)
{
ASSERT(scriptExecutionContext()->isDocument());
Document* document = static_cast<Document*>(scriptExecutionContext());
Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.h (121437 => 121438)
--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.h 2012-06-28 16:43:23 UTC (rev 121437)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.h 2012-06-28 16:52:40 UTC (rev 121438)
@@ -121,6 +121,7 @@
EventTargetData m_eventTargetData;
SpeechRecognitionController* m_controller;
+ bool m_stoppedByActiveDOMObject;
};
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes