Open Bug 1547019 Opened 5 years ago Updated 2 years ago

Replace _cxxTypeCanOnlyMove with _cxxTypeNeedsMoveForSend

Categories

(Core :: IPC, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox68 --- affected

People

(Reporter: peterv, Unassigned)

References

Details

Bug 1546356 added a _cxxTypeCanOnlyMove that's mostly identical to _cxxTypeNeedsMoveForSend. Nika asked me to replace it with _cxxTypeNeedsMoveForSend, but that causes a lot of changes to signatures for existing IPC methods, so I've decided to split it off into this bug. I have a partial patch for this.

The issue is that _cxxTypeNeedsMoveForSend seems to really return "can this type be moved". For example it returns true for Shmem (which can also be copied). However, when deciding whether to generate a copy constructor for a struct or union, we want to know whether the type can be copied at all (true for Shmem but false for ManagedEndpoint).

There's also confusing code like https://searchfox.org/mozilla-central/rev/66086345467c69685434dd1c5177b30a7511b1a5/ipc/ipdl/ipdl/lower.py#2713 which seems to skip generating move constructors and assignment operators in cases where _cxxTypeNeedsMoveForSend returns true.

The priority flag is not set for this bug.
:jld, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jld)

I think Nika has a better idea of how to prioritize this.

Flags: needinfo?(jld) → needinfo?(nika)

If it's been waiting for ~2 months, it's probably safe to make it a P3 so I stop getting email about it.

Type: defect → enhancement
Flags: needinfo?(nika)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.