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

Check if the script thread outlives web worker threads #11512

Closed
Ms2ger opened this issue May 30, 2016 · 4 comments
Closed

Check if the script thread outlives web worker threads #11512

Ms2ger opened this issue May 30, 2016 · 4 comments
Assignees

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented May 30, 2016

This may be a problem now that we use the parent runtime support.

CC @tschneidereit @nox @jdm

@tschneidereit
Copy link
Contributor

@tschneidereit tschneidereit commented May 30, 2016

Hmm, maybe. I know too little about the lifetime of script threads vs workers to judge this. Ideally we'd have some script thread and JSRuntime whose lifetime is guaranteed to equal the process' lifetime, and make that be the parent for all other JSRuntimes in the process. Might be worth it to create a runtime not used for any actual content just for that. With low heap size and a compacting GC run after its creation, perhaps.

@jdm
Copy link
Member

@jdm jdm commented May 30, 2016

For something like browser.html a long-lived runtime for the root page is easy and sensible. For non-browser.html it's much harder to conceptualize what a long-lived script thread would do. A small per-content process runtime that is unrelated to any script thread and usable as the parent for all other runtimes makes the most sense to me.

@nox nox self-assigned this May 30, 2016
@nox
Copy link
Member

@nox nox commented May 30, 2016

I've started to write something in rust-mozjs to go that way.

@nox
Copy link
Member

@nox nox commented May 30, 2016

nox added a commit to nox/servo that referenced this issue May 30, 2016
nox added a commit to nox/servo that referenced this issue May 31, 2016
bors-servo added a commit that referenced this issue May 31, 2016
Bump rust-mozjs for the safe Runtime::new (fixes #11512)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11520)
<!-- Reviewable:end -->
avadacatavra added a commit to avadacatavra/servo that referenced this issue Jun 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.