If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED FIXED in mozilla37

Status

()

Core
IPC
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: aklotz, Assigned: aklotz)

Tracking

unspecified
mozilla37
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

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.
Created attachment 8538147 [details] [diff] [review]
Prevent IPDL from generating duplicate typedefs
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!
Created attachment 8538645 [details] [diff] [review]
PContentChild.h diff

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)
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0d4cb5f206c
Backed out for Mulet permacrashing.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2cfe0238dedc

https://treeherder.mozilla.org/logviewer.html#?job_id=4769926&repo=mozilla-inbound
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
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Blocks: 998863
You need to log in before you can comment on or make changes to this bug.