Skip to content

Comments

feat: ServiceWorkerMain#45232

Merged
samuelmaddock merged 9 commits intomainfrom
feat/service-worker-main
Jan 24, 2025
Merged

feat: ServiceWorkerMain#45232
samuelmaddock merged 9 commits intomainfrom
feat/service-worker-main

Conversation

@samuelmaddock
Copy link
Member

@samuelmaddock samuelmaddock commented Jan 17, 2025

Description of Change

Split from #44411
Implements part of RFC #8

Tracks lifetime of content::ServiceWorkerVersion. This class lives as long as a service worker registration is live. A new instance is required for each new 'version' of a service worker script installed.

Only scope and versionId are currently exposed. This isn't too useful until IPC support is added in a follow up PR.

Checklist

Release Notes

Notes:

  • Added ServiceWorkerMain class to interact with service workers in the main process.
  • Added fromVersionID on ServiceWorkers to get an instance of ServiceWorkerMain.
  • Added running-status-changed event on ServiceWorkers to indicate when a service worker's running status has changed.
  • Added startWorkerForScope on ServiceWorkers to start a worker that may have been previously stopped.

@samuelmaddock samuelmaddock added semver/minor backwards-compatible functionality api-review/skip-delay ⏰ Skip the mandatory 7 day waiting period for new APIs target/35-x-y PR should also be added to the "35-x-y" branch. labels Jan 17, 2025
@samuelmaddock samuelmaddock requested a review from a team as a code owner January 17, 2025 03:36
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

LGTM, some minor nits

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

LGTM, pending CI

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

API LGTM

Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

Code LGTM - thanks for adding tests!

Copy link
Member

@itsananderson itsananderson left a comment

Choose a reason for hiding this comment

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

API LGTM

@samuelmaddock samuelmaddock force-pushed the feat/service-worker-main branch from 8ad7b07 to 96dedfd Compare January 24, 2025 02:22
@samuelmaddock samuelmaddock merged commit a467d06 into main Jan 24, 2025
59 checks passed
@samuelmaddock samuelmaddock deleted the feat/service-worker-main branch January 24, 2025 13:33
@release-clerk
Copy link

release-clerk bot commented Jan 24, 2025

Release Notes Persisted

  • Added ServiceWorkerMain class to interact with service workers in the main process.
  • Added fromVersionID on ServiceWorkers to get an instance of ServiceWorkerMain.
  • Added running-status-changed event on ServiceWorkers to indicate when a service worker's running status has changed.
  • Added startWorkerForScope on ServiceWorkers to start a worker that may have been previously stopped.

@trop
Copy link
Contributor

trop bot commented Jan 24, 2025

I was unable to backport this PR to "35-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/35-x-y and removed target/35-x-y PR should also be added to the "35-x-y" branch. labels Jan 24, 2025
@samuelmaddock samuelmaddock mentioned this pull request Jan 24, 2025
5 tasks
@trop
Copy link
Contributor

trop bot commented Jan 24, 2025

@samuelmaddock has manually backported this PR to "35-x-y", please check out #45341

@trop trop bot added in-flight/35-x-y merged/35-x-y PR was merged to the "35-x-y" branch. and removed needs-manual-bp/35-x-y in-flight/35-x-y labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review/approved ✅ api-review/skip-delay ⏰ Skip the mandatory 7 day waiting period for new APIs merged/35-x-y PR was merged to the "35-x-y" branch. semver/minor backwards-compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants