REGRESSION (173394): Support for webcam is broken
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Dec 2014 12:59:41 +0000 (12:59 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Dec 2014 12:59:41 +0000 (12:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139313

Reviewed by Alexey Proskuryakov.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):

    Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.

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

Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

index fc01299..55d1f15 100644 (file)
@@ -1,3 +1,15 @@
+2014-12-06  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION (173394): Support for webcam is broken
+        https://bugs.webkit.org/show_bug.cgi?id=139313
+
+        Reviewed by Alexey Proskuryakov.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
+
+            Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
+
 2014-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
 
         [CoordinatedGraphics] Move CoordinatedBackingStore and CoordinatedGraphicsScene to Shared
index d8c6fe6..89e12f7 100644 (file)
@@ -198,6 +198,10 @@ void NetworkResourceLoader::didReceiveResponseAsync(ResourceHandle* handle, cons
     if (isSynchronous())
         m_synchronousLoadData->response = response;
     else {
+        // For multipart/x-mixed-replace didReceiveResponseAsync gets called multiple times and buffering would require special handling.
+        if (response.isMultipart())
+            m_bufferedData = nullptr;
+
         if (!sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponse(response, m_parameters.isMainResource)))
             return;
     }