Title: [186097] trunk/Source/WebCore
- Revision
- 186097
- Author
- [email protected]
- Date
- 2015-06-29 17:24:05 -0700 (Mon, 29 Jun 2015)
Log Message
AX: PlatformSpeechSynthesizer code doesn't catch Objective-C exceptions
https://bugs.webkit.org/show_bug.cgi?id=146419
Reviewed by Simon Fraser.
Make sure ObjC exception resulting from calling into the platform cause problems in WebKit.
* platform/ios/PlatformSpeechSynthesizerIOS.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:]):
(-[WebSpeechSynthesisWrapper pause]):
(-[WebSpeechSynthesisWrapper resume]):
(-[WebSpeechSynthesisWrapper cancel]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (186096 => 186097)
--- trunk/Source/WebCore/ChangeLog 2015-06-30 00:15:56 UTC (rev 186096)
+++ trunk/Source/WebCore/ChangeLog 2015-06-30 00:24:05 UTC (rev 186097)
@@ -1,3 +1,21 @@
+2015-06-29 Chris Fleizach <[email protected]>
+
+ AX: PlatformSpeechSynthesizer code doesn't catch Objective-C exceptions
+ https://bugs.webkit.org/show_bug.cgi?id=146419
+
+ Reviewed by Simon Fraser.
+
+ Make sure ObjC exception resulting from calling into the platform cause problems in WebKit.
+
+ * platform/ios/PlatformSpeechSynthesizerIOS.mm:
+ (-[WebSpeechSynthesisWrapper speakUtterance:]):
+ (-[WebSpeechSynthesisWrapper pause]):
+ (-[WebSpeechSynthesisWrapper resume]):
+ (-[WebSpeechSynthesisWrapper cancel]):
+ (-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
+ (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
+ (WebCore::PlatformSpeechSynthesizer::pause):
+
2015-06-29 Matt Rajca <[email protected]>
Removing an element from a media session should also remove it from the sets of active participating elements
Modified: trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm (186096 => 186097)
--- trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm 2015-06-30 00:15:56 UTC (rev 186096)
+++ trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm 2015-06-30 00:24:05 UTC (rev 186097)
@@ -29,6 +29,7 @@
#if ENABLE(SPEECH_SYNTHESIS)
+#include "BlockExceptions.h"
#include "PlatformSpeechSynthesisUtterance.h"
#include "PlatformSpeechSynthesisVoice.h"
#include "SoftLinking.h"
@@ -95,6 +96,7 @@
if (!utterance)
return;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
if (!m_synthesizer) {
m_synthesizer = adoptNS([allocAVSpeechSynthesizerInstance() init]);
[m_synthesizer setDelegate:self];
@@ -125,6 +127,7 @@
m_utterance = utterance;
[m_synthesizer speakUtterance:avUtterance];
+ END_BLOCK_OBJC_EXCEPTIONS
}
- (void)pause
@@ -132,7 +135,9 @@
if (!m_utterance)
return;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
[m_synthesizer pauseSpeakingAtBoundary:AVSpeechBoundaryImmediate];
+ END_BLOCK_OBJC_EXCEPTIONS
}
- (void)resume
@@ -140,7 +145,9 @@
if (!m_utterance)
return;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
[m_synthesizer continueSpeaking];
+ END_BLOCK_OBJC_EXCEPTIONS
}
- (void)cancel
@@ -148,7 +155,9 @@
if (!m_utterance)
return;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
[m_synthesizer stopSpeakingAtBoundary:AVSpeechBoundaryImmediate];
+ END_BLOCK_OBJC_EXCEPTIONS
}
- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didStartSpeechUtterance:(AVSpeechUtterance *)utterance
@@ -236,6 +245,7 @@
void PlatformSpeechSynthesizer::initializeVoiceList()
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
for (AVSpeechSynthesisVoice *voice in [AVSpeechSynthesisVoiceClass speechVoices]) {
NSString *language = [voice language];
bool isDefault = true;
@@ -248,6 +258,7 @@
#endif
m_voiceList.append(PlatformSpeechSynthesisVoice::create(voiceURI, name, language, true, isDefault));
}
+ END_BLOCK_OBJC_EXCEPTIONS
}
void PlatformSpeechSynthesizer::pause()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes