Bug 1632046 [wpt PR 23165] - [WPT/common/security-features] Remove unnecessary clear of onmessage, a=testonly
authorHiroshige Hayashizaki <hiroshige@chromium.org>
Wed, 13 May 2020 03:58:21 +0000
changeset 593707 5b60b7cf3f2f3ae0b781e3cd5b2e64935a789084
parent 593706 22ed9be427522e2f1ce7d9c4fd588dc2f3df4c30
child 593708 7088d1301e7ad55d2d082c68f611b6eb3b239cc1
push id13186
push userffxbld-merge
push dateMon, 01 Jun 2020 09:52:46 +0000
treeherdermozilla-beta@3e7c70a1e4a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1632046, 23165, 2158437, 764573
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1632046 [wpt PR 23165] - [WPT/common/security-features] Remove unnecessary clear of onmessage, a=testonly Automatic update from web-platform-tests [WPT/common/security-features] Remove unnecessary clear of onmessage Change-Id: I58a28de941891fba0d3c3a7c0376489e3e490267 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2158437 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#764573} -- wpt-commits: dfe0b490c6018fd36379f4c7726f9f6a37728838 wpt-pr: 23165
testing/web-platform/tests/common/security-features/scope/template/worker.js.template
--- a/testing/web-platform/tests/common/security-features/scope/template/worker.js.template
+++ b/testing/web-platform/tests/common/security-features/scope/template/worker.js.template
@@ -8,21 +8,16 @@ if ('DedicatedWorkerGlobalScope' in self
   onconnect = event => {
     const port = event.ports[0];
     port.onmessage = event => onMessageFromParent(event, port);
   };
 }
 
 // Receive a message from the parent and start the test.
 function onMessageFromParent(event, port) {
-  // Because this worker might receive messages from child context during
-  // tests, we first remove the listener here before staring the test
-  // (needed only for dedicated workers).
-  port.onmessage = undefined;
-
   const configurationError = "%(error)s";
   if (configurationError.length > 0) {
     port.postMessage({error: configurationError});
     return;
   }
 
   invokeRequest(event.data.subresource,
                 event.data.sourceContextList)