Bug 1773770: Part 9 - Migrate widget component content proxies to static registration...
commit0a4ce6199e5ceb25d28ac8b34c2eae1d7b6d84d2
authorKris Maglione <maglione.k@gmail.com>
Thu, 30 Jun 2022 09:12:18 +0000 (30 09:12 +0000)
committerKris Maglione <maglione.k@gmail.com>
Thu, 30 Jun 2022 09:12:18 +0000 (30 09:12 +0000)
treea2e69188562e9da90d63fc844b2e553af74b01dc
parentdf4aae4dd360779b9c41e376e7d131c67029b9c2
Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8

Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
12 files changed:
mobile/android/components/geckoview/ColorPickerDelegate.jsm
mobile/android/components/geckoview/components.conf
toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js
widget/android/components.conf
widget/cocoa/components.conf
widget/components.conf [new file with mode: 0644]
widget/gtk/components.conf
widget/moz.build
widget/nsContentProcessWidgetFactory.cpp [deleted file]
widget/nsContentProcessWidgetFactory.h [new file with mode: 0644]
widget/windows/components.conf
xpcom/components/nsComponentManager.cpp