New issue
Advanced search Search tips

Issue 894544 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Add notification mechanism for origin trials enabled by script

Project Member Reported by cha...@chromium.org, Oct 11

Issue description

Origin trials can be enabled by script in a page, by adding a new <meta> tag to the document, with a valid trial token. For example, this could be a library/third-party script included in the top-level document, first-party script conditionally adding a token based on client-side logic, etc.

Some features may integrate with the OT framework by checking the enabled state on load, and then plumbing the result through to the browser, or other locations. Ideally, the enabled state of a trial would be always be determined by querying the OT framework on demand, but that isn't always feasible.

For integrations that effectively cache the enabled state of a trial, it would be useful to provide a notification if a trial is later enabled via script.
 
Cc: chrisha@chromium.org
One specific case is that of supporting interventions on OT infrastructure. The intervention opt-in/opt-out needs to be applied across an entire frame-tree in a consistent way, so we manually aggregate the policy state of each frame once at document load.

The aggregated policy is being queried repeatedly as it is applied in the browser. Manually re-querying each remote frame every time the policy is queried would be quite wasteful, and would involve O(N) round-trip IPCs plus an O(N) aggregation computation.

Our ideal solution is for the OT infrastructure to have a notification mechanism in the renderer process, which our integration would then forward to the browser, which would trigger a re-aggregation of the "page" level policy to be applied. This would allow page-level policy to change dynamically in response to dynamic changes made by a frame.

Sign in to add a comment