Fix URLSchemeHandler.SyncXHR API test after r234735.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Aug 2018 23:07:24 +0000 (23:07 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Aug 2018 23:07:24 +0000 (23:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188358

* UIProcess/WebURLSchemeTask.cpp:
(WebKit::WebURLSchemeTask::didReceiveData):
Return after appending data for synchronous loads.  We used to send unused messages.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebURLSchemeTask.cpp

index 7f3caca..ec3a54b 100644 (file)
@@ -1,5 +1,14 @@
 2018-08-09  Alex Christensen  <achristensen@webkit.org>
 
+        Fix URLSchemeHandler.SyncXHR API test after r234735.
+        https://bugs.webkit.org/show_bug.cgi?id=188358
+
+        * UIProcess/WebURLSchemeTask.cpp:
+        (WebKit::WebURLSchemeTask::didReceiveData):
+        Return after appending data for synchronous loads.  We used to send unused messages.
+
+2018-08-09  Alex Christensen  <achristensen@webkit.org>
+
         REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework
         https://bugs.webkit.org/show_bug.cgi?id=188453
         <rdar://problem/43102553>
index d576a14..f68cdc9 100644 (file)
@@ -111,9 +111,10 @@ auto WebURLSchemeTask::didReceiveData(Ref<SharedBuffer>&& buffer) -> ExceptionTy
 
     if (isSync()) {
         if (m_syncData)
-            m_syncData->append(buffer);
+            m_syncData->append(WTFMove(buffer));
         else
             m_syncData = WTFMove(buffer);
+        return ExceptionType::None;
     }
 
     m_page->send(Messages::WebPage::URLSchemeTaskDidReceiveData(m_urlSchemeHandler->identifier(), m_identifier, IPC::SharedBufferDataReference(buffer.ptr())));