Closed Bug 1545299 Opened 5 years ago Closed 5 years ago

Fix mutual recursion checking for UniquePtr<> in IPDL

Categories

(Core :: IPC, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Bug 1500219 added UniquePtr<> support to IPDL, but it doesn't quite work in some cases.

One issue is that UniquePtr can't be used as the field of a struct. If you try to compile this IPDL file, then the type checker throws an exception:

struct Y { int y; };

struct X { UniquePtr<Y> x; };

protocol PUndefSelfRecUniquePtr {
child: async __delete__(X x);
};

This should also be rejected in the case where the type of the x field of X had type UniquePtr<X> instead.

I think array, maybe, and uniqueptr types can be dealt with more uniformly by adding a hasBaseType() method, rather than having a bunch of places where we check a list of these kind of mini aggregated types. I have some patches in progress to address this issue.

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task

This consolidates array, maybe and unique ptrs in IPDL into a single
"has base type" qualifier, for types that wrap another type. I'm not
sure this patch fixes everything, but I think it is at least more
correct.

It also adds checking for the stuff inside the UniquePtr<>, because
the intent seems to be to allow things like protocol types in there.

Priority: -- → P1
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3fa69313f159
Make UniquePtr work more like the other types with a base type. r=nika
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: