Skip to content
Commit 0f0890cf authored by Devlin Cronin's avatar Devlin Cronin Committed by Chromium LUCI CQ
Browse files

[Extensions] Wire up the renderer for multiple user script worlds

We're going to add support for multiple user script worlds for use
in the userScripts API. This will allow better isolation of individual
scripts.

Add initial support for this in the renderer by allowing multiple
worlds based on an optional string world ID (which will eventually be
provided by the extension). A world's key is now unique based on the
pairing of <world ID, extension ID>. If the world ID is omitted, the
renderer will use a "default" world for the execution world type. The
IsolatedWorldManager will manage these different worlds and support
injecting into them separately.

Add tests for injecting in these worlds (and that they are indeed
separate) by injecting through the ScriptExecutor.

This CL does not add any way for this new functionality to be
directly reached from an extension, or for these worlds to be
individually configured -- those will come in subsequent CLs.

Bug: 331680187
Change-Id: I6d53a8584948bd011bdb858223f0e59072500ea4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5403967


Reviewed-by: default avatarChris Bookholt <bookholt@chromium.org>
Reviewed-by: default avatarEmilia Paz <emiliapaz@chromium.org>
Commit-Queue: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1282041}
parent 27fbe7a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment