Closed Bug 1112827 Opened 10 years ago Closed 10 years ago

Cannot use base::ProcessId as a type in IPDL declarations

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(2 files)

IPDL implicitly generates typedefs for base::ProcessId by default, but since it is not explicitly declared, using ProcessId in an IPDL file will fail. OTOH, explicitly declaring ProcessId via the |using| statement will generate two identical typedefs for base::ProcessId, causing C++ compilation errors.

I'd like to add the implicit typedefs to the set of explicit typedefs so that we can declare these types if needed without the duplicate typedefs in the generated code.
Assignee: nobody → aklotz
Status: NEW → ASSIGNED
Attachment #8538147 - Flags: review?(bent.mozilla)
Comment on attachment 8538147 [details] [diff] [review]
Prevent IPDL from generating duplicate typedefs

Review of attachment 8538147 [details] [diff] [review]:
-----------------------------------------------------------------

This looks ok to me, but would you mind attaching a diff of the generated code?
(In reply to ben turner [:bent] (use the needinfo? flag!) from comment #2)
> This looks ok to me, but would you mind attaching a diff of the generated
> code?

... for just one header!
I had edited PContent.ipdl with a |using| declaration for base::ProcessId, which fails C++ compilation without the patch.

This is a diff of the generated PContentChild.h demonstrating the effect of the patch on the generated header.
Flags: needinfo?(bent.mozilla)
Comment on attachment 8538147 [details] [diff] [review]
Prevent IPDL from generating duplicate typedefs

Review of attachment 8538147 [details] [diff] [review]:
-----------------------------------------------------------------

Great, thanks!
Attachment #8538147 - Flags: review?(bent.mozilla) → review+
Flags: needinfo?(bent.mozilla)
Mulet when green again before the above checkin was backed out.
The crashes were not IPC related, so I'm not sure what was going on there.
Discussed with RyanVM, trying to reland:
https://hg.mozilla.org/integration/mozilla-inbound/rev/841573344c3f
https://hg.mozilla.org/mozilla-central/rev/841573344c3f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: