Fix GetInProcessParentDocshell usage in nsDocShell::RecomputeCanExecuteScripts
Categories
(Core :: DOM: Navigation, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
(Blocks 1 open bug)
Details
Attachments
(8 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
It ignores OOP ancestors, which it probably shouldn't. The flag probably needs to move to BrowsingContext instead.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Used for disabling JS for a page, probably used by devtools.
kmag, I have a few spare cycles, so Neha suggested I could pick this bug, but I don't quite understand the objective. Are there any tests I can run to get a better idea of the problem?
Assignee | ||
Comment 3•4 years ago
|
||
I'm not sure. Devtools definitely toggles the allowJavascript
flag, and would therefore be affected by this:
https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1251
But I don't know what tests would use it, or whether there are any existing tests that use it with OOP subframes.
Either way, I think we probably just want to move the flag from nsDocShell to BrowsingContext, and ideally change Devtools to set it in the parent so we can forbid trying to set it from a child.
Comment 4•4 years ago
•
|
||
So, to summarize:
- Move
allowJavascript
fromnsDocShell
toBrowsingContext
. - Fix something with
RecomputeCanExecuteScript
. I don't understand what yet. Remove the dependency onparent->mCanExecuteScripts
, maybe? - Fix DevTools so that it touches
allowJavascript
only in the parent. - Remove/forbid
allowJavascript
in the child.
Do I understand correctly so far?
Assignee | ||
Comment 5•4 years ago
|
||
RecomputeCanExecuteScript
would just have to look at ancestor BrowsingContext
s rather than ancestor DocShell
s.
Updated•4 years ago
|
Depends on D91197
Depends on D91412
Depends on D91413
Updated•4 years ago
|
Updated•4 years ago
|
I won't have time to finish this.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 12•3 years ago
|
||
Steven, there is one patch from yoric that needs to be re-written. Can you pick this up please?
Comment 13•3 years ago
|
||
This is only used by devtools and doesn't block 50% Fission Nightly experiment. Moving it to M7 to block Fission on Beta.
Steven, when you get to work on this, please discuss with Nika as she has thoughts on how this should be done correctly by moving to the parent process.
Comment 14•3 years ago
|
||
We stopped saving this information long ago (see Bug 1328013) but the
restoration code was left in place. Since allowJavascript
is being moved
to the BrowsingContext we might as well remove the old restoration code.
Comment 15•3 years ago
|
||
(In reply to Neha Kochar [:neha] from comment #13)
This is only used by devtools and doesn't block 50% Fission Nightly experiment. Moving it to M7 to block Fission on Beta.
Steven, when you get to work on this, please discuss with Nika as she has thoughts on how this should be done correctly by moving to the parent process.
Sounds good. I've dumped my WIP patches to phabricator and will come back to this once my other M6c work is complete.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 16•3 years ago
|
||
They were originally written for the extension framework, but have been used
more and more widely ever since.
Assignee | ||
Comment 17•3 years ago
|
||
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.
Comment 18•3 years ago
|
||
Pushed by maglione.k@gmail.com: https://hg.mozilla.org/integration/autoland/rev/284dc9ca5f5c Part 1 - Move some XPCShell content helpers to generic shared module. r=nika https://hg.mozilla.org/integration/autoland/rev/0fa59c7f0f82 Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
Comment 19•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/284dc9ca5f5c
https://hg.mozilla.org/mozilla-central/rev/0fa59c7f0f82
Assignee | ||
Comment 20•3 years ago
|
||
Comment 21•3 years ago
|
||
Pushed by maglione.k@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3ddb25d50aa6 Follow-up: Review comment fixes that wound up in the wrong patch.
Comment 22•3 years ago
|
||
bugherder |
Description
•