Reviewed by Eric Seidel.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Dec 2009 23:59:24 +0000 (23:59 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Dec 2009 23:59:24 +0000 (23:59 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=32175
        REGRESSION: websocket/tests/url-parsing.html is crashing on Leopard Bot

        * platform/network/cf/SocketStreamHandleCFNet.cpp:
        (WebCore::SocketStreamHandle::readStreamCallback): Call platformClose() to unschedule both
        streams, guaranteeing that there will be no callbacks after SocketStreamHandle is destroyed.
        (WebCore::SocketStreamHandle::writeStreamCallback): Edited a comment a bit.

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

WebCore/ChangeLog
WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp

index 93631dc441e12693a7b7effa5961eff97b3cee4f..72bfcc2ad7a6288c5fa2f5c7859bc2c6401a3353 100644 (file)
@@ -1,3 +1,15 @@
+2009-12-05  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Eric Seidel.
+
+        https://bugs.webkit.org/show_bug.cgi?id=32175
+        REGRESSION: websocket/tests/url-parsing.html is crashing on Leopard Bot
+
+        * platform/network/cf/SocketStreamHandleCFNet.cpp:
+        (WebCore::SocketStreamHandle::readStreamCallback): Call platformClose() to unschedule both
+        streams, guaranteeing that there will be no callbacks after SocketStreamHandle is destroyed.
+        (WebCore::SocketStreamHandle::writeStreamCallback): Edited a comment a bit.
+
 2009-12-05  Adam Langley  <agl@google.com>
 
         Reviewed by Adam Barth.
index 904275b196488da6c51b98706628228aae8602ec..ac4f88cbcea41a965700e5af1eed8a7c760ddcd8 100644 (file)
@@ -529,7 +529,7 @@ void SocketStreamHandle::readStreamCallback(CFStreamEventType type)
         break;
     }
     case kCFStreamEventEndEncountered:
-        m_client->didClose(this);
+        platformClose();
         break;
     }
 }
@@ -571,7 +571,7 @@ void SocketStreamHandle::writeStreamCallback(CFStreamEventType type)
         break;
     }
     case kCFStreamEventEndEncountered:
-        // FIXME: Currently, we call didClose from read callback, but these can come independently (e.g. a server can stop listening, but keep sending data).
+        // FIXME: Currently, we handle closing in read callback, but these can come independently (e.g. a server can stop listening, but keep sending data).
         break;
     }
 }