Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice.html

Issue 180553004: Fix use-after-free of m_currentSpeechUtterance. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix nullptr again? Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice.html
diff --git a/LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice.html b/LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice.html
new file mode 100644
index 0000000000000000000000000000000000000000..ec23fc63334ce3eb0307a88f0ce61699d58a0e72
--- /dev/null
+++ b/LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body id="body">
+
+<div id="console"></div>
+
+<script>
+
+ description("This tests that cancelling an utterance a second time after garbage collection doesn't crash under ASAN.");
+
+ if (window.internals)
+ window.internals.enableMockSpeechSynthesizer(document);
+
+ speechSynthesis.speak(new SpeechSynthesisUtterance("Hello"));
+ speechSynthesis.cancel();
+ window.gc();
+ speechSynthesis.cancel();
+
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698