mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
([Connection -forwardForProxy:selector:argFrame:]): In nested function
decoder(), always set IP to -1 after sending it -dismiss, i.e. in both cases. Fix the assertion at the bottom so that IP is allowed to be nil, which will be the case when mframe_build_return() never calls decoder(), which will happen when we are returning void. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2220 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
be7036a1a0
commit
62b2cc43a9
1 changed files with 8 additions and 3 deletions
|
@ -592,7 +592,7 @@ static int messages_received_count;
|
|||
if (ip) {
|
||||
/* this must be here to avoid trashing alloca'ed retframe */
|
||||
[ip dismiss];
|
||||
ip = nil;
|
||||
ip = (id)-1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -614,6 +614,7 @@ static int messages_received_count;
|
|||
[ip decodeObjectAt: &exc
|
||||
withName: NULL];
|
||||
[ip dismiss];
|
||||
ip = (id)-1;
|
||||
/* xxx Is there anything else to clean up in
|
||||
dissect_method_return()? */
|
||||
[exc raise];
|
||||
|
@ -630,8 +631,12 @@ static int messages_received_count;
|
|||
|
||||
retframe = mframe_build_return (argframe, type, out_parameters,
|
||||
decoder);
|
||||
/* Make sure we processed all arguments, and dismissed the IP. */
|
||||
assert (ip == (id)-1);
|
||||
/* Make sure we processed all arguments, and dismissed the IP.
|
||||
IP is always set to -1 after being dismissed; the only places
|
||||
this is done is in this function DECODER(). IP will be nil
|
||||
if mframe_build_return() never called DECODER(), i.e. when
|
||||
we are just returning (void).*/
|
||||
assert (ip == (id)-1 || ip == nil);
|
||||
return retframe;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue