New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 798010 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 598073



Sign in to add a comment

Make URLLoaderThrottles work with web workers

Project Member Reported by jam@chromium.org, Dec 28 2017

Issue description

Since URLLoaderThrottles replace ResourceThrottles, they need to work for worker-initiated requests.

Here's a simple example:

index.html:
<html>
<script>
function startWorker() {
  var worker = new Worker("worker.js");
  worker.postMessage("foo.txt");
  worker.onmessage = function(d) {
    console.log(d.data)
  }
}
</script>
<input type="button" onclick="startWorker()" value="create worker" />
</html>



worker.js:
onmessage = function(e) {
  var xhr = new XMLHttpRequest();
  xhr.open("GET", e.data, true);
  xhr.onreadystatechange = function () {
    if (xhr.readyState == 4) {
      postMessage(xhr.responseText);
      close();
    }
  }
  xhr.send(null);
}



foo.txt:
hello world
 

Comment 1 by jam@chromium.org, Dec 28 2017

Labels: -OS-Windows

Comment 2 by jam@chromium.org, Dec 28 2017

Components: Services Internals>Services>Network
Labels: Proj-Servicification
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe5f3a5abb01f41172925736868e0b464f25f7cf

commit fe5f3a5abb01f41172925736868e0b464f25f7cf
Author: Yuzhu Shen <yzshen@chromium.org>
Date: Thu Jan 11 21:24:13 2018

Network Service: make sure SafeBrowsing URL check is run for requests from workers.

Including dedicated workers, shared workers and service workers.

Bug:  798010 
Change-Id: I447cf5ef519467d7d867337a3065ba6ef1179008
Reviewed-on: https://chromium-review.googlesource.com/849420
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Yuzhu Shen <yzshen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528757}
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/android_webview/BUILD.gn
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/android_webview/renderer/aw_content_renderer_client.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/android_webview/renderer/aw_content_renderer_client.h
[add] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/android_webview/renderer/aw_url_loader_throttle_provider.cc
[add] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/android_webview/renderer/aw_url_loader_throttle_provider.h
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/renderer/BUILD.gn
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/renderer/chrome_content_renderer_client.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/renderer/chrome_content_renderer_client.h
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/renderer/chrome_content_renderer_client_browsertest.cc
[add] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/renderer/url_loader_throttle_provider_impl.cc
[add] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/renderer/url_loader_throttle_provider_impl.h
[add] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/test/data/safe_browsing/malware_js_request.html
[rename] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/chrome/test/data/safe_browsing/malware_js_request_worker.js
[delete] https://crrev.com/26d63890c1c2981a54450932cf2e0d34f026768b/chrome/test/data/safe_browsing/malware_websocket.html
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/public/renderer/BUILD.gn
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/public/renderer/content_renderer_client.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/public/renderer/content_renderer_client.h
[add] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/public/renderer/url_loader_throttle_provider.h
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/render_thread_impl.h
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/service_worker/service_worker_fetch_context_impl.h
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/content/renderer/shared_worker/embedded_shared_worker_stub.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/extensions/shell/renderer/shell_content_renderer_client.cc
[modify] https://crrev.com/fe5f3a5abb01f41172925736868e0b464f25f7cf/extensions/shell/renderer/shell_content_renderer_client.h

Comment 5 by yzshen@chromium.org, Jan 11 2018

Status: Fixed (was: Started)

Sign in to add a comment