Default new protocols to be `[RefCounted]`
Categories
(Core :: IPC, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
Details
Attachments
(2 files)
Assignee | ||
Comment 1•3 years ago
|
||
The changes to ipdl actors were mechanical, and largely automated using
a script.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
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.
Comment 3•3 years ago
|
||
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.
Comment 5•3 years ago
|
||
bugherder |
Description
•