Bug 1236266 shows that it's really easy to write a buggy ParamTraits that causes very strange crashes in the IPC code. We should make the source of these bugs much more obvious by adding release assertions. One option would be to encode automatically the length that was written by each custom ParamTraits. If the length we read doesn't match, then we would immediately crash. This would definitely add some overhead, but I think it would be worth it for Nightly/Aurora. The hard part here is figuring out where to stick the length checking code. I'm hoping there's a single pinch point, but I haven't looked carefully yet.