After I landed my XMLHttpRequest patch, crashes started to happen frequently: Thread 2 Crashed: 0 <<00000000>> 0xfffeff20 objc_msgSend_rtp + 32 1 com.apple.Foundation 0x9291ecb0 _replacementObjectForObject + 124 2 com.apple.Foundation 0x9291eb04 _encodeObject_old + 156 3 com.apple.Foundation 0x9291f974 -[NSHTTPURLRequestParameters encodeWithCoder:] + 92 4 com.apple.Foundation 0x9291eb6c _encodeObject_old + 260 5 com.apple.Foundation 0x9291f04c -[NSURLRequest encodeWithCoder:] + 436 6 com.apple.Foundation 0x9291eb6c _encodeObject_old + 260 7 com.apple.Foundation 0x9291e584 -[NSURLCache _diskCacheExecuteWrite:] + 128 8 com.apple.Foundation 0x92917378 -[NSURLCache _diskCacheSync] + 256 9 com.apple.CoreFoundation 0x90770aec __CFRunLoopDoTimer + 184 10 com.apple.CoreFoundation 0x9075d464 __CFRunLoopRun + 1680 11 com.apple.CoreFoundation 0x9075ca18 CFRunLoopRunSpecific + 268 12 com.apple.Foundation 0x9290f9fc +[NSURLCache _diskCacheSyncLoop:] + 152 13 com.apple.Foundation 0x928e73b4 forkThreadForFunction + 108 14 libSystem.B.dylib 0x9002b1e0 _pthread_body + 96 I still don't see any problems in the code, but I have a patch that fixes (masks??) the issue.
Created attachment 6794 [details] proposed fix The StringImpl change is actually unrelated - looks like a typo, found it while trying to isolate the problem.
This change obviously needs comments like "this is a workaround for rdar://...", but I'm not sure what to write in this Radar yet.
Comment on attachment 6794 [details] proposed fix r=me
Filed the NSURLConnection problem as <rdar://4464032>, added the comment while landing.