New issue
Advanced search Search tips

Issue 810117 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocked on:
issue 778497

Blocking:
issue 161072



Sign in to add a comment

Web Locks API: align client IDs with Service Worker

Project Member Reported by jsb...@chromium.org, Feb 7 2018

Issue description

locks/lock_manager.cc, in LockManager::CreateService:

const std::string client_id = base::GenerateGUID();

service_worker/service_worker_provider_host.cc in the ServiceWorkerProviderHost constructor:

client_uuid_(base::GenerateGUID())

These IDs should be the "environment id":

https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-id

... and should therefore match for requests from the same "agent". Instead, we're minting them in the browser process on a per-service basis.

 
Blocking: 161072
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 29 2018

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

commit eeca82f01b5f53ebcc09076bcf14a3cb6bf5a86d
Author: Joshua Bell <jsbell@chromium.org>
Date: Fri Jun 29 00:54:57 2018

Web Locks API: Test for clientId match with Service Workers

The Service Workers API provides clientIds for FetchEvents and the
clients API. The Web Locks API provides clientIds for the query() API.
These should match for a given client (e.g. a controlled iframe
holding a lock and making a fetch) - add a test to verify that this is
the case.

(This currently fails in Chrome since clientIds are minted
separately for Service Workers and Web Locks.)

Bug:  804548 , 810117
Change-Id: I3b56e52a203dd89b9070d804d92aaada0176b8ed
Reviewed-on: https://chromium-review.googlesource.com/1117888
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571347}
[add] https://crrev.com/eeca82f01b5f53ebcc09076bcf14a3cb6bf5a86d/third_party/WebKit/LayoutTests/http/tests/locks/clientids-expected.txt
[add] https://crrev.com/eeca82f01b5f53ebcc09076bcf14a3cb6bf5a86d/third_party/WebKit/LayoutTests/http/tests/locks/clientids.html
[add] https://crrev.com/eeca82f01b5f53ebcc09076bcf14a3cb6bf5a86d/third_party/WebKit/LayoutTests/http/tests/locks/resources/service-worker.js
[add] https://crrev.com/eeca82f01b5f53ebcc09076bcf14a3cb6bf5a86d/third_party/WebKit/LayoutTests/http/tests/locks/resources/sw-controlled-iframe.html

Status: Assigned (was: Available)
Blockedon: 778497

Sign in to add a comment