Closed Bug 1546356 Opened 5 years ago Closed 5 years ago

Allow ManagedEndPoints as members of unions/structs

Categories

(Core :: IPC, defect, P1)

Other Branch
defect

Tracking

()

RESOLVED FIXED
Fission Milestone M2
Tracking Status
firefox68 --- affected

People

(Reporter: peterv, Assigned: peterv)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Currently the IPDL code generator generates code that doesn't compile (mainly because ManagedEndPoints can't be copied).

I ended up special-casing ManagedEndPoints, instead of doing these changes for everything that returns true for _cxxTypeNeedsMove. When I tried to use _cxxTypeNeedsMove I ran into code using the copy operator= for things like arrays, and I didn't want to fix up the whole tree for instances like that.

As this involves at least one change to the IPDL front end (type.py), please add some basic tests for this to ipc/ipdl/test/ipdl/, probably just in the ok/ subdirectory. You can run these tests by going to <objdir>/ipc/ipdl/test/ and running make check.

Priority: -- → P1
Blocks: 1547019

(In reply to Andrew McCreight [:mccr8] from comment #6)

As this involves at least one change to the IPDL front end (type.py), please add some basic tests for this to ipc/ipdl/test/ipdl/, probably just in the ok/ subdirectory. You can run these tests by going to <objdir>/ipc/ipdl/test/ and running make check.

The existing tests in that directory for Endpoint and ManagedEndpoint should be sufficient. The problems manifest themselves in the generated C++ code, which I don't think these tests try to compile. I'll try to write the generated C++ tests that are missing for Endpoints and ManagedEndpoints in structs/unions (if there had been existing tests they would have failed before).

Fission Milestone: --- → M2
Version: Trunk → Other Branch
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Pushed by pvanderbeken@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4a3bbc944a3
Allow ManagedEndPoints as members of unions/structs. Part 1: Include headers for parent and child actors. r=nika
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f3173e9665c
Allow ManagedEndPoints as members of unions/structs. Part 2: add a typedef for ManagedEndpoint if it's used in a struct or union. r=nika
https://hg.mozilla.org/integration/mozilla-inbound/rev/618728a9d10f
Allow ManagedEndPoints as members of unions/structs. Part 3: don't generate code that copies members of unions and structs if they contain a ManagedEndpoint. r=nika
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb1572f21b81
Allow ManagedEndPoints as members of unions/structs. Part 4: Forward declare the inner type of a ManagedEndpoint. r=nika
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: