Rewrite WebNavigationContent.js in Fission-compatible C++
Categories
(WebExtensions :: General, task, P2)
Tracking
(Fission Milestone:M7a, firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: zombie, Assigned: kmag)
References
(Blocks 1 open bug)
Details
(Whiteboard: fission-webext)
Attachments
(11 files, 6 obsolete files)
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 | |
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 | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.
This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:
0ee3c76a-bc79-4eb2-8d12-05dc0b68e732
Assignee | ||
Comment 3•6 years ago
|
||
This is the kind of thing that should really be rewritten in C++. In any case, I'm not really sure it makes sense as a JSWindowActor, since it's meant to span navigations, and JSWindowActors are tied to a specific inner window.
Comment 5•5 years ago
|
||
Please triage this into M6b or M6b if its Nightly blocking or M7 is it is Beta blocking.
Reporter | ||
Comment 6•5 years ago
•
|
||
I'm not actually sure what to do with this bug. As Kris mentions above, this isn't the best match for a JSWindowActor, but I'm probably not experienced enough with our internals to do it in C++.
Kris, could you perhaps describe in some detail what exactly this would involve? So that I, or maybe Kashav/Anny could have a go at it?
Otherwise, I think I this could easily be a JSProcessActor, which will be much better, but unsure if good enough for memory reasons.
Comment 7•5 years ago
|
||
This bug doesn't seem to need to block our Nightly experiment, so I'm moving it from our old M6 milestone to M6c (so we revisit this bug before our Beta experiment).
Assignee | ||
Comment 8•5 years ago
|
||
It could be made into a process actor with a bit of effort, but I think converting it to C++ is really the correct solution.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Doesn't need to block Fission Nightly experiments.
kmag says it should block Fission Beta because it affects WebExtensions. WebNavigation API currently doesn't work on out-of-process frames.
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Assignee | ||
Comment 11•5 years ago
|
||
The need for this has come up fairly often recently, and it greatly simplifies
the JS-to-C++ conversion I'm doing in this bug.
In the future, I'll probably make this a non-refcounted class and add a
subclass with templatized native value types, but the current version is close
to the bare minimum I need for this bug, and I don't want to delay it.
Assignee | ||
Comment 12•5 years ago
|
||
Ideally this would use a JS WeakSet for its implementation, but there's
currently no public API, and I'd rather not take the time to add one just now.
A WeakMap works well enough for the use cases of this bug, though.
In the future, I'll probably change this (along with WeakMap) to not be ref
counted, but I don't want to delay these patches for the sake of that.
Assignee | ||
Comment 13•5 years ago
|
||
The extension framework keeps track of the previous URI for outer windows
using WeakMaps so that it can compare against them when it receives
onLocationChange events. That mostly works, but it's not especially efficient.
Storing it directly in the DocShell is much cleaner, and makes it available to
other consumers as well.
Ideally we'd probably want a version of this available in the parent process
which supports cross-process navigations, but the extension framework only
cares about it for same-document navigations, so it's fine as-is for those
purposes.
Assignee | ||
Comment 14•5 years ago
|
||
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like do_GetInterface
.
Assignee | ||
Comment 15•5 years ago
|
||
Assignee | ||
Comment 16•5 years ago
|
||
This is the start of an actor which will be automatically instantiated in the
parent and each content process which can be used to route most process-level
IPC traffic needed by the extensions framework. It should allow the extensions
framework to keep its IPC glue close to the code that uses it, and simplify
matters for child-side code which needs to run in both parent and content
processes.
Assignee | ||
Comment 17•5 years ago
|
||
This is a skeleton class which will be instantiated at startup in each
process, and eventually track the same events that the deprecated
WebNavigationContent.js frame script currently tracks.
Actual implementation is added in follow-up patches.
Assignee | ||
Comment 18•5 years ago
|
||
This mirrors the current form submit tracker in WebNavigationContent.js, and
stores a WeakSet entry for a WindowGlobal whenever it receives a DOMFormSubmit
event.
These entries are consumed by code added in follow-up patches.
Assignee | ||
Comment 19•5 years ago
|
||
This ports the WebProgressListener logic from WebNavigationContent.js to the
C++ implementation, and adds IPC messages to send them to the parent process.
Linkage between the parent IPDL endpoints and the listeners in
WebNavigation.jsm is added in a subsequent patch.
Assignee | ||
Comment 20•5 years ago
|
||
This ports the last remaining piece of WebNavigationContent.js, the
DOMContentLoaded event listener, to C++ and adds IPC messages to notify the
parent process of the events. Linkage between the parent IPDL endpoints and
the parent WebNavigation.jsm listeners is added in a subsequent patch.
Assignee | ||
Comment 21•5 years ago
|
||
This migrates WebNavigation.jsm to use messages from PExtensionsParent
generated by the native WebNavigationContent class, and removes the now-unused
WebNavigationContent.js frame script.
Assignee | ||
Comment 22•4 years ago
|
||
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.
Assignee | ||
Comment 23•4 years ago
|
||
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.
Assignee | ||
Comment 24•4 years ago
|
||
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.
Assignee | ||
Comment 25•4 years ago
|
||
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 26•4 years ago
|
||
Comment 27•4 years ago
|
||
Backed out for bustages jsapi.h
Backout link: https://hg.mozilla.org/integration/autoland/rev/616c7f5da6dbf2cdded23e0afb2f5cce537e6129
Log link: https://treeherder.mozilla.org/logviewer?job_id=333594576&repo=autoland&lineNumber=44338
Updated•4 years ago
|
Assignee | ||
Comment 28•4 years ago
|
||
The IPDL source added in this stack changes the unified protocol chunking and
triggers problems caused by the missing include.
Assignee | ||
Updated•4 years ago
|
Comment 29•4 years ago
|
||
Comment 30•4 years ago
|
||
Backed out for causing hazard failures on ExtensionsParent.cpp.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=334092361&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/75e750d8ff501b363b214b204d948930db6269e4
Comment 31•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 32•4 years ago
|
||
Comment 33•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9796577af27a
https://hg.mozilla.org/mozilla-central/rev/e1d7851295fd
https://hg.mozilla.org/mozilla-central/rev/826c62b783c0
https://hg.mozilla.org/mozilla-central/rev/6003469dc449
https://hg.mozilla.org/mozilla-central/rev/b4c5ace21b9e
https://hg.mozilla.org/mozilla-central/rev/4199963fe477
https://hg.mozilla.org/mozilla-central/rev/ee611f0839ca
https://hg.mozilla.org/mozilla-central/rev/9ceaad6dab5b
https://hg.mozilla.org/mozilla-central/rev/0a33cb185fb3
https://hg.mozilla.org/mozilla-central/rev/93fe6801a5e2
Comment 34•4 years ago
|
||
Backed out for hazard failures
backout: https://hg.mozilla.org/integration/autoland/rev/3abbeff037f6755b34c242b19b0b363e9db7a3fb
failure log: https://treeherder.mozilla.org/logviewer?job_id=334240776&repo=autoland&lineNumber=18998 (firstly seen on a subsequent push)
[task 2021-03-24T05:36:30.192Z] TinderboxPrint: rooting hazards<br/>1
[task 2021-03-24T05:36:30.192Z] TinderboxPrint: (unsafe references to unrooted GC pointers)<br/>224
[task 2021-03-24T05:36:30.192Z] TinderboxPrint: (unnecessary roots)<br/>1217
[task 2021-03-24T05:36:30.192Z] TinderboxPrint: missing expected hazards<br/>0
[task 2021-03-24T05:36:30.192Z] TinderboxPrint: heap write hazards<br/>0
[task 2021-03-24T05:36:30.193Z] TEST-UNEXPECTED-FAIL | hazards | unrooted '<returnvalue>' of type 'JS::Value' live across GC call at toolkit/components/extensions/ExtensionsParent.cpp:55
[task 2021-03-24T05:36:30.193Z] TEST-UNEXPECTED-FAIL | hazards | 1 rooting hazards detected
[task 2021-03-24T05:36:30.193Z] TinderboxPrint: documentation<br/><a href='https://wiki.mozilla.org/Javascript:Hazard_Builds#Diagnosing_a_rooting_hazards_failure'>static rooting hazard analysis failures</a>, visit "Inspect Task" link for hazard details
[task 2021-03-24T05:36:30.194Z] + grab_artifacts
[task 2021-03-24T05:36:30.194Z] + local artifacts
[task 2021-03-24T05:36:30.194Z] + artifacts=/builds/worker/artifacts
[task 2021-03-24T05:36:30.194Z] + '[' -d /builds/worker/workspace/haz-browser ']'
[task 2021-03-24T05:36:30.194Z] + cd /builds/worker/workspace/haz-browser
[task 2021-03-24T05:36:30.194Z] + ls -lah
[task 2021-03-24T05:36:30.199Z] total 7.2G
Updated•4 years ago
|
![]() |
||
Comment 35•4 years ago
|
||
Backout merged: https://hg.mozilla.org/mozilla-central/rev/3abbeff037f6
Comment 36•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 37•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4817f2a9474a
https://hg.mozilla.org/mozilla-central/rev/f7b615f0996e
https://hg.mozilla.org/mozilla-central/rev/e260ff83e079
https://hg.mozilla.org/mozilla-central/rev/48a00fa9459e
https://hg.mozilla.org/mozilla-central/rev/2d4a14c67ba4
https://hg.mozilla.org/mozilla-central/rev/1cefc071f729
https://hg.mozilla.org/mozilla-central/rev/0ac1d8c7421d
https://hg.mozilla.org/mozilla-central/rev/cb495001c38f
https://hg.mozilla.org/mozilla-central/rev/7376b07ffe66
https://hg.mozilla.org/mozilla-central/rev/fd71757fa790
Description
•