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 531022 c260a1c92bb9101d4f540b5db432cd4b017f1932
parent 531021 295f84c67c8c56989306cf2d9c1dc1923c15eb40
child 531023 aaa4b8916c4687c0db21225ccaa15d607fdda80a
push id37435
push userapavel@mozilla.com
push dateWed, 20 May 2020 15:28:23 +0000
treeherdermozilla-central@5415da14ec9a [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)