Skip to content
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

Try to ensure sandboxed preload scripts run in the correct realm #768

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

Conversation

jgraham
Copy link
Member

@jgraham jgraham commented Sep 6, 2024

Previously we were passing the environment settings object for the Window realm into evaluate function body, which is incorrect.

Instead update environment settings to point to the environment settings object for the sandboxed realm.

Also have a go at defining the steps to create a sandboxed realm and ensure that it has an environment settings object that we can use.


Preview | Diff

Previously we were passing the environment settings object for the
Window realm into `evaluate function body`, which is incorrect.

Instead update `environment settings` to point to the environment
settings object for the sandboxed realm.

Also have a go at defining the steps to create a sandboxed realm and
ensure that it has an environment settings object that we can use.
@jgraham jgraham requested a review from OrKoN October 29, 2024 10:16
@@ -1257,8 +1257,55 @@ To <dfn>get or create a sandbox realm</dfn> given |name| and |navigable|:
<div algorithm>
To <dfn>create a sandbox realm</dfn> with |window|:

Issue: Define creation of sandbox realm. This is going to return a
{{SandboxWindowProxy}} wrapping |window|.
1. Let |window environment settings| be the [=environment settings object=] whose
Copy link
Contributor

Choose a reason for hiding this comment

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

By looking at call sites of "create a sandbox realm" the argument should be navigable, so probably we need the env settings object of |navigable|'s [=active window=].


<dt>The [=environment settings object/module map=]
<dd>Return |global|'s module map.
Issue: Need to define module map for {{SandboxWindowProxy}} objects.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this issue is not rendered properly? Perhaps it needs newlines or needs to be outside of dl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants