Open Bug 1631792 Opened 5 years ago Updated 1 year ago

Remove all of js/ipc and the CPOW infrastructure now that it is unused

Categories

(Core :: DOM: Content Processes, task, P2)

task

Tracking

()

Tracking Status
firefox77 --- affected

People

(Reporter: Gijs, Unassigned)

References

(Depends on 4 open bugs, )

Details

CPOWs are dead, long live CPOWs.

Well, after bug 1631358, anyway.

We can remove all the now-unused IPC gunk for them, id est:

  • All of (?) js/ipc;
  • all references to the Javascript ipc protocol elsewhere in the tree
  • rewrite all of inside_cpow to use inside_sync (possibly with a follow-up to evaluate how many of those are still necessary, either) and remove support for inside_cpow
  • prefs for cpow timeouts and logging / forbidding unsafe access
  • with that done, probably audit https://searchfox.org/mozilla-central/search?q=cpow or similar to see what else remains (right now this maxes out searchfox's 1000 hits, but a lot is in the stuff we'd remove in the other steps and/or bug 1631358
Depends on: 1631358
Component: IPC → DOM: Content Processes
Priority: -- → P2

Another useful search would be jsipc. I think that'll catch a lot of forward declarations and "using namespace" that might be missed by other stuff. Although hopefully that will naturally get removed by the other stuff.

The severity field is not set for this bug.
:neha, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(nkochar)
Severity: -- → N/A
Depends on: 1638373
Depends on: 1638374

(In reply to :Gijs (he/him) from comment #0)

  • prefs for cpow timeouts and logging / forbidding unsafe access

Here are the uses of StaticPrefs inside the js/ipc directory:
StaticPrefs::dom_ipc_cpows_forbid_unsafe_from_browser()
StaticPrefs::dom_ipc_cpows_log_enabled()
StaticPrefs::dom_ipc_cpows_log_stack()

There are no other occurances of "prefs" in this directory. Fortunately, they all contain "cpows", so they'd be easily found by followup cleanup.

Flags: needinfo?(nkochar)

NS_ERROR_XPC_CANT_PASS_CPOW_TO_NATIVE is another thing that can be removed (and would also be caught by a search for CPOWs).

Depends on: 1640964
Depends on: 1640967
Depends on: 1640971

All references to "jsipc" are gone now. (Aside from the weird orderfile stuff.)

Depends on: 1640974
Type: defect → task
Depends on: 1642401
Depends on: 1663300
Depends on: 1842111
You need to log in before you can comment on or make changes to this bug.