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

Unified Diff: third_party/WebKit/LayoutTests/fast/workers/close-context-messageport-crash.html

Issue 2546313003: M56: Messaging: Fix crash when MessagePort is closed while messages are queued (Closed)
Patch Set: Created 4 years 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 | third_party/WebKit/LayoutTests/fast/workers/resources/close-context-messageport-crash-iframe.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/workers/close-context-messageport-crash.html
diff --git a/third_party/WebKit/LayoutTests/fast/workers/close-context-messageport-crash.html b/third_party/WebKit/LayoutTests/fast/workers/close-context-messageport-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..83f7abd65604b8603d317ca8c83bbc0c5ebc8b90
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/workers/close-context-messageport-crash.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>crash when closing a MessagePort with messages queued for dispatch</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<body>
+</body>
+<script>
+var resolve_done;
+let done_promise = new Promise(resolve => resolve_done = resolve);
+
+function done() {
+ document.querySelector('iframe').remove();
+ resolve_done();
+}
+
+// This test creates an iframe with a SharedWorker that does multiple
+// postMessages back to the iframe. Once a message is received, the
+// iframe is removed. The test passes if it does not crash
+// https://crbug.com/649616.
+promise_test(t => {
+ const frame = document.createElement('iframe');
+ frame.src = 'resources/close-context-messageport-crash-iframe.html';
+ document.body.appendChild(frame);
+ return done_promise;
+}, 'closing a MessagePort with messages queued for dispatch should not crash');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/workers/resources/close-context-messageport-crash-iframe.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698