Rebase against 60a3e0106246cb91d598a815d4fadf2791011142.

This commit is contained in:
Alistair Leslie-Hughes
2021-08-18 08:34:28 +10:00
parent b09fe464be
commit d7b8304e38
5 changed files with 56 additions and 76 deletions

View File

@@ -1,4 +1,4 @@
From 740afed65c692a9f96494465ddb72a362fa91613 Mon Sep 17 00:00:00 2001
From b36d2db7b14e50e6bc2e74313f918737b32b60e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 8 Sep 2020 18:43:52 +0200
Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60.
@@ -7,12 +7,12 @@ Update from Gijs Vermeulen <gijsvrm@gmail.com>
---
dlls/msxml3/Makefile.in | 2 +-
dlls/msxml3/factory.c | 5 +
dlls/msxml3/httprequest.c | 503 +++++++++++++++++++++++++++++++++++-
dlls/msxml3/httprequest.c | 496 +++++++++++++++++++++++++++++++++++-
dlls/msxml3/msxml_private.h | 1 +
dlls/msxml3/tests/httpreq.c | 395 +++++++++++++++++++++++++++-
dlls/msxml3/tests/schema.c | 6 +
dlls/msxml3/uuid.c | 5 +
7 files changed, 912 insertions(+), 5 deletions(-)
7 files changed, 905 insertions(+), 5 deletions(-)
diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in
index 936c745895d..f9e629f89bc 100644
@@ -26,7 +26,7 @@ index 936c745895d..f9e629f89bc 100644
EXTRAINCL = $(XML2_CFLAGS) $(XSLT_CFLAGS)
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index b8452ff4b4e..90a042fec92 100644
index 1a489b87a94..1c8e04813e5 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -281,6 +281,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
@@ -49,28 +49,25 @@ index b8452ff4b4e..90a042fec92 100644
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP30 ) ||
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP40 ) ||
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 7286eb97bb7..ed59a12912b 100644
index 15a1f888ebd..a05e07b0c42 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -44,13 +44,16 @@
#include "docobj.h"
@@ -38,11 +38,13 @@
#include "shlwapi.h"
#include "msxml_dispex.h"
+#include "initguid.h"
+#include "rtworkq.h"
+
#include "msxml_private.h"
#include "wine/debug.h"
#ifdef HAVE_LIBXML2
#include "wine/unicode.h"
-WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+WINE_DEFAULT_DEBUG_CHANNEL(xmlhttp);
static const WCHAR colspaceW[] = {':',' ',0};
static const WCHAR crlfW[] = {'\r','\n',0};
@@ -2031,6 +2034,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl =
@@ -2075,6 +2077,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl =
ServerXMLHTTPRequest_setOption
};
@@ -539,7 +536,7 @@ index 7286eb97bb7..ed59a12912b 100644
static void init_httprequest(httprequest *req)
{
req->IXMLHTTPRequest_iface.lpVtbl = &XMLHTTPRequestVtbl;
@@ -2080,6 +2545,35 @@ HRESULT XMLHTTPRequest_create(void **obj)
@@ -2124,6 +2588,35 @@ HRESULT XMLHTTPRequest_create(void **obj)
return S_OK;
}
@@ -575,25 +572,16 @@ index 7286eb97bb7..ed59a12912b 100644
HRESULT ServerXMLHTTP_create(void **obj)
{
serverhttp *req;
@@ -2109,6 +2603,13 @@ HRESULT XMLHTTPRequest_create(void **ppObj)
return E_NOTIMPL;
}
@@ -2143,3 +2636,4 @@ HRESULT ServerXMLHTTP_create(void **obj)
+HRESULT XMLHTTPRequest2_create(void **ppObj)
+{
+ MESSAGE("This program tried to use a XMLHTTPRequest object, but\n"
+ "libxml2 support was not present at compile time.\n");
+ return E_NOTIMPL;
+}
return S_OK;
}
+
HRESULT ServerXMLHTTP_create(void **obj)
{
MESSAGE("This program tried to use a ServerXMLHTTP object, but\n"
diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
index a59e00bf2b3..9797f96f3ca 100644
index d578d5de560..9fac4e5936f 100644
--- a/dlls/msxml3/msxml_private.h
+++ b/dlls/msxml3/msxml_private.h
@@ -501,6 +501,7 @@ extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN;
@@ -390,6 +390,7 @@ extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN;
extern HRESULT SAXXMLReader_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
extern HRESULT SAXAttributes_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
extern HRESULT XMLHTTPRequest_create(void **) DECLSPEC_HIDDEN;
@@ -602,7 +590,7 @@ index a59e00bf2b3..9797f96f3ca 100644
extern HRESULT XSLTemplate_create(void**) DECLSPEC_HIDDEN;
extern HRESULT MXWriter_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c
index 4a23f1d82a8..25378a99bdc 100644
index 2491e499638..511c2b26763 100644
--- a/dlls/msxml3/tests/httpreq.c
+++ b/dlls/msxml3/tests/httpreq.c
@@ -26,9 +26,9 @@
@@ -617,7 +605,7 @@ index 4a23f1d82a8..25378a99bdc 100644
#include "dispex.h"
#include "initguid.h"
@@ -1333,6 +1333,17 @@ static IXMLHttpRequest *create_xhr(void)
@@ -1348,6 +1348,17 @@ static IXMLHttpRequest *create_xhr(void)
return SUCCEEDED(hr) ? ret : NULL;
}
@@ -635,7 +623,7 @@ index 4a23f1d82a8..25378a99bdc 100644
static IServerXMLHTTPRequest *create_server_xhr(void)
{
IServerXMLHTTPRequest *ret;
@@ -1889,11 +1900,388 @@ static void test_supporterrorinfo(void)
@@ -1908,11 +1919,388 @@ static void test_supporterrorinfo(void)
IServerXMLHTTPRequest_Release(server_xhr);
}
@@ -1025,7 +1013,7 @@ index 4a23f1d82a8..25378a99bdc 100644
if (!(xhr = create_xhr()))
{
@@ -1908,6 +2296,7 @@ START_TEST(httpreq)
@@ -1927,6 +2315,7 @@ START_TEST(httpreq)
test_server_xhr();
test_safe_httpreq();
test_supporterrorinfo();
@@ -1034,7 +1022,7 @@ index 4a23f1d82a8..25378a99bdc 100644
CoUninitialize();
}
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
index 964e368bf84..1b3b5cbad1b 100644
index 219d7144ddb..7ef033237a1 100644
--- a/dlls/msxml3/tests/schema.c
+++ b/dlls/msxml3/tests/schema.c
@@ -32,10 +32,16 @@