Inject our nsIContentPolicy implementation into all processes
Description (last modified by trev)
We are currently registering our content policy in the main process only. This works thanks to the E10S compatibility shim but causes lots of CPOW traffic as we inspect the context of the requests - along with warnings in the Error Console and slowdowns.
What to change
Inject our nsIContentPolicy implementation into all processes, similar to how it was done for the about: module in #3108. Use synchronous messaging to ask a central instance to make a decision. Data should be attached to nodes in the content process, meaning that RequestNotifier needs to be reworked as well.
In particular, this means splitting up our current contentPolicy module into contentPolicy and child/contentPolicy. The latter should contain all the low-level code: actual content policy implementation, redirect and pop-up listeners. The remaining code in contentPolicy would only be responsible for making decisions when messaged from child/contentPolicy (synchronously, because content policy responses have to be synchronous).
Change History (48)
comment:9 Changed 17 months ago by trev
- Review URL(s) modified (diff)
- Status changed from new to reviewing