Open
Bug 1346911
Opened 7 years ago
Updated 2 years ago
Report an error when a top level protocol has a delete message
Categories
(Core :: IPC, enhancement, P3)
Core
IPC
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
References
Details
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
Details |
type.py checks to make sure that non-top-level protocols have a delete message, but it doesn't check that top level protocols don't have delete messages. Instead (as in bug 1345977) we seem to just generate an empty delete message. The existing check is: if not (p.decl.type.hasDelete or p.decl.type.isToplevel()): self.error( p.loc, "destructor declaration `%s(...)' required for managed protocol `%s'", _DELETE_MSG, p.name)
Comment hidden (mozreview-request) |
Reporter | ||
Comment 2•7 years ago
|
||
Here's a first pass at this. As you can see, there are a ton of test protocols that declare delete. Maybe it actually did something when we had a state machine? There were a lot of "DEAD: __delete__()" annotations in those files. PVRManager.ipdl is the only non-test file that does so. The next step is to audit the dozen or so test protocols in the error/ subdirectory, to figure out which ones need to have __delete__() removed, and then double check that they fail for the right reason once the __delete__ is removed.
Comment 3•7 years ago
|
||
Looks like http://searchfox.org/mozilla-central/rev/571c1fd0ba0617f83175ccc06ed6f3eb0a1a8b92/ipc/ipdl/ipdl/lower.py#3733-3735 and http://searchfox.org/mozilla-central/rev/571c1fd0ba0617f83175ccc06ed6f3eb0a1a8b92/ipc/ipdl/ipdl/lower.py#3751-3753 can be removed or turned into asserts after this.
Reporter | ||
Comment 4•7 years ago
|
||
Ah, nice! I wondered why the delete message cases were empty.
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → continuation
Comment hidden (mozreview-request) |
Reporter | ||
Updated•7 years ago
|
Assignee: continuation → nobody
Updated•7 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•