Closed Bug 1736371 Opened 3 years ago Closed 3 years ago

Default new protocols to be `[RefCounted]`

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: nika, Assigned: nika)

Details

Attachments

(2 files)

No description provided.

The changes to ipdl actors were mechanical, and largely automated using
a script.

Assignee: nobody → nika
Status: NEW → ASSIGNED

I've attached the super sketchy 1-use python script I used to perform the initial rewrite, in case I need to tweak it again. I also needed to perform some minor manual cleanup afterwords (especially around the ipdl test files). It's all quite gross, but it (mostly) worked.

I ran it with find . -name '*.ipdl' | xargs -n1 python3 rewrite.py, after doing a clobber to make sure it didn't find files in the objdir.

I think this is fine as is, but for future reference, a "safer" way to do a conversion like this would be to first add the ManualDealloc keyword and switch over all existing default users to it, requiring that a protocol be either RefCounted or ManualDealloc. Then you could do a second patch to remove all of the RefCounted. You could build the intermediate state to ensure that every protocol was one or the other. Doing a big flag day for everything means a greater potential for a protocol being turned from ManualDealloc to RefCounted if it is missed out. Presumably it would end up failing fast, and the transformation here is pretty simple so it would probably have been overkill here.

Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/133e994ea1e7 Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: