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

Remove uses of opts::get() from components/script #23639

Open
oneturkmen opened this issue Jun 26, 2019 · 1 comment
Open

Remove uses of opts::get() from components/script #23639

oneturkmen opened this issue Jun 26, 2019 · 1 comment

Comments

@oneturkmen
Copy link
Contributor

@oneturkmen oneturkmen commented Jun 26, 2019

There are two non-trivial uses of opts::get() in components/script; script_runtime.rs and dom/bindings/conversions.rs, respectively.

These are non-trivial because there is no direct way of passing them via Window or GlobalScope. We should refactor to be able to pass those arguments without using global opts::get().

Related to #22854.

@kitlith
Copy link
Contributor

@kitlith kitlith commented Oct 26, 2019

for the one in script_runtime.rs, we may be able to thread an argument through several function calls until we reach a function that does have access to GlobalScope. (unless I'm misunderstanding what you're saying?) However... that seems kinda ugly, and I'm not sure how much of an option that is for conversions.rs.

It'd be easier to apply the pattern used in #24500, but easier may not be better in this case, especially since we're not dealing with global/static functions that have to have no arguments.

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
3 participants
You can’t perform that action at this time.