Skip to content

[fetch-later] Add FetchLaterParams into network::mojom::URLRequest. #41842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 6, 2023

Sequence Diagram: https://docs.google.com/document/d/1U8XSnICPY3j-fjzG35UVm6zjwL6LvX6ETU3T8WrzLyQ/edit#heading=h.y51nt9atd97v

  • Replace URLRequest::is_fetch_later_api with
    URLRequest::fetch_later_params.
  • Define FetchLaterPrams, which includes a pending_remote of
    FetchLaterClient.
  • Define FetchLaterClient, which supports SetFetchLaterHost() and
    Clone(). The former should be implemented in blink to support
    Renderer->Browser communication.
  • Define FetchLaterHost, which is implemented by every
    KeepAliveURLLoader. It supports a one-time method SendNow() and
    Abort().
  • Aborting a FetchLater request right after calling fetchLater(), and
    then disposing a page, can introduce race condition, such that the
    browser still send out the request. In KeepAliveURLLoader, it tries
    to mitigate this by looking into the custom disconnection reason
    from the remote of FetchLaterClient. But the race can still happen.
    OT info will include this problem.

See the "Renderer->Browser Communication" section 1 for the details
and other considered alternatives.

Subsequent CL https://crrev.com/c/4803283 will use this interface to
implement fetchLater()'s backgroundTimeout feature.

Bug: 1465781
Change-Id: Ib5067de1a10478cd0bb16ff6c4d981872bf5c1a6

Reviewed-on: https://chromium-review.googlesource.com/4803083
WPT-Export-Revision: 9440dfbb3d9c37fcb94e9ec5033f9a37a12586e8

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4803083 branch 4 times, most recently from c868618 to 09c721c Compare September 13, 2023 08:38
Sequence Diagram: https://docs.google.com/document/d/1U8XSnICPY3j-fjzG35UVm6zjwL6LvX6ETU3T8WrzLyQ/edit#heading=h.y51nt9atd97v

- Replace `URLRequest::is_fetch_later_api` with
  `URLRequest::fetch_later_params`.
- Define `FetchLaterPrams`, which includes a pending_remote of
  FetchLaterClient.
- Define `FetchLaterClient`, which supports `SetFetchLaterHost()` and
  `Clone()`. The former should be implemented in blink to support
  Renderer->Browser communication.
- Define `FetchLaterHost`, which is implemented by every
  KeepAliveURLLoader. It supports a one-time method `SendNow()` and
  `Abort()`.
- Aborting a FetchLater request right after calling fetchLater(), and
  then disposing a page, can introduce race condition, such that the
  browser still send out the request. In KeepAliveURLLoader, it tries
  to mitigate this by looking into the custom disconnection reason
  from the remote of FetchLaterClient. But the race can still happen.
  OT info will include this problem.

See the "Renderer->Browser Communication" section [1] for the details
and other considered alternatives.

Subsequent CL https://crrev.com/c/4803283 will use this interface to
implement fetchLater()'s backgroundTimeout feature.

[1]: https://docs.google.com/document/d/1U8XSnICPY3j-fjzG35UVm6zjwL6LvX6ETU3T8WrzLyQ/edit#heading=h.15fe7ufeo4uv

Bug: 1465781
Change-Id: Ib5067de1a10478cd0bb16ff6c4d981872bf5c1a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants