diff options
author | Martin Baulig <mabaul@microsoft.com> | 2019-05-15 02:30:01 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-05-21 13:33:55 +0300 |
commit | 1eb9161ca6b096e5f13f1a604e38557dde6e5c74 (patch) | |
tree | 5850fd48b180661a540c55d9114b010cc26c4bd7 /mcs/class/System.XML | |
parent | aee4cdd248cded15c47dc64e61c78ca48c235af3 (diff) |
Removing some remoting and multi-appdomain APIs on wasm and the AOT test profiles.
Build / profile changes:
------------------------
* `build/profiles/testing_aot_common.make`: define `DISABLE_REMOTING = yes` and
`NO_MULTIPLE_APPDOMAINS = yes`.
* `mcs/class/corlib/Makefile`: check `DISABLE_REMOTING` when setting
`REFERENCE_SOURCES_FLAGS` (and don't define `FEATURE_REMOTING`, `MONO_COM`
and `FEATURE_COMINTEROP`).
* added new `testing_aot_common_corlib.dll.exclude.sources`. Several types in
the `System.Runtime.Remoting.Messaging` namespace are used by the runtime in
non-remoting scenarios, so those need to be preserved.
For all other remoting namespaces, we only need a few stripped down stub versions
of the some of the types; those have been added to a new `legacy` directory, so
we can wildcard-exclude all the files here.
* added new `testing_aot_common_corlib.dll.sources`; this currently only contains
`legacy/*.cs` to list above mentioned stub versions.
* added new `testing_aot_common_corlib_test.dll.exclude.sources` as a common test
excludes file.
API Changes (conditional to `DISABLE_REMOTING`):
------------------------------------------------
* `mcs/class/corlib/legacy/`: add stub-versions for some of the remoting-related
classes that are used by the runtime (so we can't completely remove those types):
- `System.MarshalByRefObject`.
- `System.Runtime.Remoting.IRemotingTypeInfo`.
- `System.Runtime.Remoting.ObjectHandle`.
- `System.Runtime.Remoting.RemotingServices`.
- `System.Runtime.Remoting.Activation.ActivationServices`.
- `System.Runtime.Remoting.Contexts.Context`.
- `System.Runtime.Remoting.Messaging.ILogicalThreadAffinative`.
- `System.Runtime.Remoting.Messaging.LogicalCallContext`.
- `System.Runtime.Remoting.Proxies.TransparentProxy`.
- `System.Runtime.Remoting.Proxies.RealProxy`.
some of these have fields that need to be preserved; these are marked with
appropriate `#region` pragmas.
All changes below are conditional to `DISABLE_REMOTING`.
* `System.Runtime.Remoting.Messaging.AsyncResult`: this class is used by some of
the async code, so we can't completely remove it. However, we can remove the
`MonoMethodMessage call_message` field when `DISABLE_REMOTING`.
* `System.Runtime.Remoting.Messaging.MonoMethodMessage`: this class is also used
by some runtime code and thus needs to be preserved. However, when `DISABLE_REMOTING`
is defined, then we make some changes to it:
- remove all iterfaces (`IMethodCallMessage`, `IMethodReturnMessage`, and `IInternalMessage`).
- `Properties` throws `PlatformNotSupportedException`.
* `System.Runtime.InteropServices.Marshal`: disable some COM-related code.
* `System.Threading.Thread`: remove `CurrentContext` property.
* `System.Threading.ExecutionContext`: adjust conditional logic; don't define
`FEATURE_REMOTING` if `DISABLE_REMOTING`.
* `System.Activator`: add `DISABLE_REMOTING` to the existing
`#if FEATURE_REMOTING || MOBILE_LEGACY` conditional in this class.
* `System.AppDomain`: since we only have one domain, `DefaultDomain` will always
return the root domain; comment out the call to `RemotingServices.GetDomainProxy`
as well as some internal methods.
* `System.__ComObject`: stub out on `DISABLE_REMOTING` as well as `!FULL_AOT_RUNTIME`.
* `System.Runtime.Serialization.Formatters.Binary.BinaryFormatter`: adjust `IFormatter`
versus `IRemotingFormatter` interface logic to use the former when `DISABLE_REMOTING`.
* `System.Runtime.Serialization.Formatters.Binary.BinaryObjectReader`: adjust existing
`#if FEATURE_REMOTING || MOBILE_LEGACY` conditional to add `DISABLE_REMOTING` to it.
* `System.Diagnostics.CorrelationManager`: comment out some `CallContext.LogicalGetData()`
and `CallContext.LogicalSetData`.
* `System.Diagnostics.TraceEventCache`: likewise.
Test changes:
-------------
* `mono/tests/Makefile.am`: conditionally disable some remoting tests.
* `corlib/Test/System.Runtime.Serialization/SerializationTest.cs`: conditionally
disable all tests requiring remoting.
* `corlib/Test/System/ActivatorTest.cs`: same; trying to preserve as much as possible
in this test.
* added some `DISABLE_REMOTING` and `DISABLE_SECURITY` conditionals to some of the tests.
Diffstat (limited to 'mcs/class/System.XML')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs index e69eb5be953..e01178b0b07 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs @@ -92,6 +92,7 @@ namespace MonoTests.System.Xml.Xsl xslt.Load (new XPathDocument (new XmlTextReader (xsl, XmlNodeType.Document, null))); } +#if !DISABLE_SECURITY [Test] [Category ("MobileNotWorking")] public void MsxslTest() { @@ -129,6 +130,7 @@ xmlns:msxsl=""urn:schemas-microsoft-com:xslt"" xmlns:stringutils=""urn:schemas-s Assert.AreEqual ("test".PadRight(20), sb.ToString()); } +#endif [Test] public void MSXslNodeSet () |