Reviewed by Darin Adler.
authortristan <tristan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 23:36:06 +0000 (23:36 +0000)
committertristan <tristan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 23:36:06 +0000 (23:36 +0000)
        <rdar://problem/5511842> REGRESSION: Webkit stops responding while loading Apple Store Canada page (15304)

        Included the NSSynchronousURLConnection_PrivateMode mode, in addition to the default run loop modes
        as an acceptable mode when using performSelectorOnMainThread with our syncronous url callbacks.

        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
        Added NSSynchronousURLConnection_PrivateMode to the list of accepted modes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/mac/ResourceHandleMac.mm

index fdec4bb9de52b5bf9d795459ac8234efbf03d779..590a1a98f25cd9b1adb4bfb4ad2269ebf814cf11 100644 (file)
@@ -1,3 +1,16 @@
+2007-10-02  Tristan O'Tierney  <tristan@apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/5511842> REGRESSION: Webkit stops responding while loading Apple Store Canada page (15304)
+        
+        Included the NSSynchronousURLConnection_PrivateMode mode, in addition to the default run loop modes
+        as an acceptable mode when using performSelectorOnMainThread with our syncronous url callbacks.
+
+        * platform/network/mac/ResourceHandleMac.mm:
+        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
+        Added NSSynchronousURLConnection_PrivateMode to the list of accepted modes.
+
 2007-10-02  Darin Adler  <darin@apple.com>
 
         Reviewed by Adam.
index 533936d571707a3d94595c788feb72f3a3e94a1b..e2707480bf4f45e4766ef067e5f8e3227b67d8c8 100644 (file)
@@ -488,7 +488,11 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
         if (cachedResponse)
             [info setObject:cachedResponse forKey:@"cachedResponse"];
 
-        [self performSelectorOnMainThread:@selector(_callConnectionWillCacheResponseWithInfo:) withObject:info waitUntilDone:YES];
+        // Include synchronous url connection's mode as an acceptable run loopmode
+        // <rdar://problem/5511842>
+        NSArray *modes = [[NSArray alloc] initWithObjects:(NSString *)kCFRunLoopCommonModes, @"NSSynchronousURLConnection_PrivateMode", nil];        
+        [self performSelectorOnMainThread:@selector(_callConnectionWillCacheResponseWithInfo:) withObject:info waitUntilDone:YES modes:modes];
+        [modes release];
 
         NSCachedURLResponse *result = [[info valueForKey:@"result"] retain];
         [info release];