Created attachment 540677 [details] [diff] [review] use nsCRTGlue nsCRT::free gets screwed by mozalloc because there are various #undefs and #defines of free. Let's use nsCRTGlue in nsStyleStruct.cpp instead, so we can compile even if free gets #undefed from under us.
Comment on attachment 540677 [details] [diff] [review] use nsCRTGlue r=dbaron
Backed out due to orange, see: http://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=2783e9b15954
Problem looks to be that nsCRT::strcmp is null-safe but NS_strcmp is not. nsStyleContentData::operator== depends on the null-safety.
Created attachment 540864 [details] [diff] [review] v2: wrap strcmp in null-checks This makes the tests that crashed on mozilla-incoming (sorry sorry sorry) pass on my local machine. I've pushed this to try.
Comment on attachment 540864 [details] [diff] [review] v2: wrap strcmp in null-checks I think we need safe_strcmp only in the second place you're using it, but you should test that :-) r=dbaron with that
But I think you should do b-a rather than a-b.
(In reply to comment #7) > But I think you should do b-a rather than a-b. To be clear, I just copied what PL_strcmp does. I don't care which I use :)
Er, sorry, a-b is correct.
(except that it doesn't work if the pointers are in the upper half of the integer space... but it doesn't really matter in this case)