-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 "responsible browsing context" #5422
Labels
clarification
Standard could be clearer
Comments
See also #1580. |
domenic
added a commit
that referenced
this issue
Apr 6, 2020
Previously it was per-browsing context. This caused a number of problems when used from workers; it went through the "responsible document" indirection which did not exist for service workers and was racy in other cases. In theory this might be cleaner if it were per agent, i.e. if agents maintained internal consistency about disabling or enabling scripting. In practice user agents seem to have a single user-agent-wide switch, and at least some of them wire that to a per-global boolean, so we just use per-global as it fits most cleanly into existing architecture and matches at least some implementation internals. Closes #1580. Helps with #5422.
domenic
added a commit
that referenced
this issue
Apr 6, 2020
The algorithm for obtaining a responsible browsing context was present on all environment settings objects. However, it was only used in Window contexts. This replaces all usage sites with more direct references to the browsing context in question. Closes #5422.
domenic
added a commit
that referenced
this issue
Apr 7, 2020
Previously it was per-browsing context. This caused a number of problems when used from workers; it went through the "responsible document" indirection which did not exist for service workers and was racy in other cases. In theory this might be cleaner if it were per agent, i.e. if agents maintained internal consistency about disabling or enabling scripting. In practice user agents seem to have a single user-agent-wide switch, and at least some of them wire that to a per-global boolean, so we just use per-global as it fits most cleanly into existing architecture and matches at least some implementation internals. Closes #1580. Helps with #5422.
domenic
added a commit
that referenced
this issue
Apr 7, 2020
The algorithm for obtaining a responsible browsing context was present on all environment settings objects. However, it was only used in Window contexts. This replaces all usage sites with more direct references to the browsing context in question. Closes #5422.
domenic
added a commit
that referenced
this issue
Apr 7, 2020
The algorithm for obtaining a responsible browsing context was present on all environment settings objects. However, it was only used in Window contexts. This replaces all usage sites with more direct references to the browsing context in question. Closes #5422.
domenic
added a commit
that referenced
this issue
Apr 7, 2020
The algorithm for obtaining a responsible browsing context was present on all environment settings objects. However, it was only used in Window contexts. This replaces all usage sites with more direct references to the browsing context in question. Closes #5422.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to #4335, we can probably remove the "responsible browsing context" concept from environment settings objects. Notably, service workers don't have one, which breaks the script execution parts of the spec (which assume that one exists).
It is used in the following ways:
Location
-object navigate" and the "window open steps". (Note that per Use of source browsing context in navigation seems totally broken to me #1130 "source browsing context" is a bad concept and should go away.)window.close()
.The latter two could be replaced by Window-specific incantations that don't need to go through the environment settings object infrastructure. For example instead of
we could do
So the only hard part here is what to do with "can execute script" checks. I think it seems very reasonable to just move that concept to globals instead of browsing contexts, personally.
The text was updated successfully, but these errors were encountered: