Created attachment 244648 [details] Backtrace When I load apple.com in the iOS Simulator using a debug build of iOS WebKit built with the public iOS SDK the assertion ASSERT(!isMainThread()) fails in -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]. I'm using OpenSource r178229 and the public iOS 8.1 SDK with Xcode Version 6.1.1 (6A2008a) on OS X 10.10.1 (14B25).
Does this get fixed if you comment out the following line? CFURLRequestSetShouldStartSynchronously(request, 1); in ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp
Created attachment 244815 [details] Patch
(In reply to comment #1) > Does this get fixed if you comment out the following line? > > CFURLRequestSetShouldStartSynchronously(request, 1); > > in ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp No, the issue reproduced even after commenting out the analogous line in ResourceHandleMac.mm: <http://trac.webkit.org/browser/trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm?rev=176949#L222>.
Pratik and I looked at this issue together today (01/16). Pratik noticed that we were incorrectly scheduling the NSURLConnection callbacks in WebKit2 with the NetworkProcess. Looking at this case, we want to schedule such callbacks to an NSOperationsQueue queue when using WebKit2 with the NetworkProcess.
Comment on attachment 244815 [details] Patch Clearing flags on attachment: 244815 Committed r178612: <http://trac.webkit.org/changeset/178612>
All reviewed patches have been landed. Closing bug.