Closed
Bug 529693
Opened 15 years ago
Closed 14 years ago
IPDL: Failed construction should result in actors being DeallocActor()'d rather than delete'd
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jduell.mcbugs, Unassigned)
Details
So the current IPDL-generated logic for SendFOOConstructor(Foo *foo) does a "delete foo" if things go poorly. I doubt this is what we want. It's certainly not what I want when I'm using this in HttpChannelChild to do a delayed/combined HttpChannelParent creation and AsyncOpen, because
1) You'd be deleting my object in the middle of one of its own method calls
2) You'd be calling delete() when my object (which is also an XPCOM inheritor) uses AddRef and Release().
I suggest that this function ought to return a failure code instead, and let the caller clean up whatever mess results.
Comment 1•15 years ago
|
||
I think that it should call the deallocateFoo function (instead of operator delete) as part of failure cleanup. That way you don't have to worry about "if the method fails before point X, the caller is responsible for cleanup, but after that IPDL is" or something hairy like that.
Agreed, invoking DeallocFoo() is the way to go.
Updated•15 years ago
|
Summary: IPDL constructors that take pre-existing actors shouldn't ever delete them → IPDL: Failed construction should result in actors being DeallocActor()'d rather than delete'd
This has been fixed for quite some time.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•