Re: PSA: The return type of IPDL Recv* methods changed from bool to mozilla::ipc::IPCResult

2016-11-16 Thread Mike Conley
This is _fantastic_. Thank you Kanru!

On 16/11/2016 9:57 AM, Kan-Ru Chen wrote:
> Hello,
> 
> In bug 1314254 the return type of IPDL Recv* methods was changed from
> bool to mozilla::ipc::IPCResult in order to make crash reports to have
> better stack information. There are now three choices to return from a
> Recv* method:
> 
> 1. return IPC_OK(); where previously we return true
> 2. return IPC_FAIL_NO_REASON(this); where we previously return false
> 3. return IPC_FAIL(this, "a string explaining the failure");
> 
> All the existing methods are mass converted to either 1 or 2. New codes
> are encouraged to annotate the failing reason with 3. I'm sorry that
> some patches were backed out because they caused m-i to m-c merge
> conflict. Hopefully the conflicts should be very easy to fix.
> 
> Kanru
> 
> [bug]: https://bugzilla.mozilla.org/show_bug.cgi?id=1314254
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
> 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


PSA: The return type of IPDL Recv* methods changed from bool to mozilla::ipc::IPCResult

2016-11-16 Thread Kan-Ru Chen
Hello,

In bug 1314254 the return type of IPDL Recv* methods was changed from
bool to mozilla::ipc::IPCResult in order to make crash reports to have
better stack information. There are now three choices to return from a
Recv* method:

1. return IPC_OK(); where previously we return true
2. return IPC_FAIL_NO_REASON(this); where we previously return false
3. return IPC_FAIL(this, "a string explaining the failure");

All the existing methods are mass converted to either 1 or 2. New codes
are encouraged to annotate the failing reason with 3. I'm sorry that
some patches were backed out because they caused m-i to m-c merge
conflict. Hopefully the conflicts should be very easy to fix.

Kanru

[bug]: https://bugzilla.mozilla.org/show_bug.cgi?id=1314254
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform