Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
AgeCommit message (Collapse)Author
2020-09-04[Winforms] Real fix for #18606 PropertyGrid didn`t edit value with ↵Александр Хухлаев
CustomTypeDescriptor (#19452) (#20347) * Revert "[Winforms] fix #18606 PropertyGrid didn`t edit value with CustomTypeDescriptor (#19452)" This reverts commit a26d2f0c3ea1804e7794f66ef37a4d9e48e1d755. * "[Winforms] Real fix for #18606 PropertyGrid didn`t edit value with CustomTypeDescriptor (#19452)" In Line 552 value and properties[i].GetValue (propertyOwners[i]) will not be same cause custom Converter can change object reference on its side, so there will be enough check at line 523
2020-09-04[Android] Enable access to up-to-date tzdata on Android 10+ (#20349)Marek Habersack
Context: https://source.android.com/devices/architecture/modular-system/runtime#time-zone-data-interactions Context: https://source.android.com/devices/tech/config/timezone-rules#timezone-apex Context: https://android.googlesource.com/platform/frameworks/base/+/a1ae02519d6fb5de636fc8728dec7cb9b14de356 Maybe helps with: https://github.com/xamarin/xamarin-android/issues/5080 Add support to read ICANN timezone data from two new locations found on devices running Android 10+. The data in the previously searched location still exists but it's most likely out of date. On Android 10+ tzdata updates will be derived via an APEX TimeData package update, whose data directory this commit sets as the first location to be searched. This commit potentially fixes the Xamarin.Android issue mentioned above. "Potentially" because I can't be sure this is what's causing it since I'm unable to reproduce the issue locally. However, out-of-date tz database seems to be the most probable cause.
2020-08-31Fix potential crash for Encoder.Convert (#20271)jeffgoku
GetByteCount will not return the right number of bytes needed, so GetBytes in Encoder.Convert will crash for some input
2020-08-31[resgen] Honour absence of -usesourcepath (#20247)Eberhard Beilharz
* Only set basepath to the source directory if useSourcePath is set. * Fixes a regression from mono 4 that happened when changing the code to not use reflection. Co-authored-by: MarkS <marksvc@gmail.com>
2020-08-25[runtime] Catch attempts to create enum types with an underlying type that ↵imhameed
is itself an incomplete enum type. (#20282) * Catch attempts to create enum types with an underlying type that is itself an incomplete enum type. Previously, only non-enum types containing fields with incomplete enum types were forbidden. * Permit static constant fields with incomplete types if the incomplete type is the type currently being defined Co-authored-by: Alexis Christoforides <alexis@thenull.net>
2020-08-11Fixing debugger hang that would occur when inspecting a field that has a ↵Alex Thibodeau
Debugger.Break in it's accessor. (#20211) Fixing TypeInfo debugger test. I added a new property which broke the num properties check.
2020-07-29jay.exe (ILASM): Incorrect loop indexing, fixes #14241 (#20144)Glenn Slayden
Fix incorrect loop indexing. Fixes #14241
2020-07-29[System] Mark BTLS callbacks as cdecl. (#19872)Esme
Fixes crashes when BTLS is compiled for Windows x86 with Clang. Co-authored-by: Vincent Povirk <vincent@codeweavers.com>
2020-07-29Fix Line problem with wrapping and tabs (#20112)Karl
Also adds a minor improvement to line wrapping, by not updating the wrap position when it can only move it earlier. This means when processing end-of-wrapped-line whitespace that it doesn't get adjusted every time. Also doesn't update the previous wrap position, but that shouldn't be used in this situation as it is only for wrapping after dashes. The real problem that this fixes is that wrapping a line at a point such that there was whitespace including a tab after the wrap position could cause an infinite loop. Without the fix, with a wrap_pos > 0 (normal), it only split the line after reaching non-whitespace. In most situations that was OK as we norwally wrap after whitespace. However a tab is whitespace we wrap before. Once pos was equal to wrap_pos it stopped incrementing pos as it was now at the split position and therefore it shouldn't change. But it didn't set split_tag, so didn't split, and therefore didn't exit the outer loop.
2020-07-17[Wasm] Additional signatures for SkiaSharp interop + More (#20133)Matthew Leibowitz
* [Wasm] Additional signatures for SkiaSharp interop * Update InterpToNativeGenerator.cs * Generate more APIs Include the bits in https://github.com/dotnet/runtime/commit/aa667de1e3fff0f951d5136a45fbe8acefad9be9
2020-07-17[wasm] Fix handling of enum types in the pinvoke generator. (#20125)Zoltan Varga
Fixes https://github.com/mono/mono/issues/20123.
2020-07-16[wasm] Fix handling of void types in the pinvoke generator. (#20121)Zoltan Varga
Fixes https://github.com/mono/mono/issues/20120.
2020-07-10[bcl] Update BCL Linked Size (#19446)monojenkins
2020-07-08Init a timer on TransactionScope initialization to be able to timeout (#20080)Pablo Martínez
Fixes #19955
2020-07-08[wasm] Implement support for pinvoke callbacks in the interpeter. (#20076)Zoltan Varga
* [wasm] Refactor the wasm tuner. Move the pinvoke table generation code into a new PInvokeTableGenerator.cs file, to be similar to the corresponding code in WasmAppBuilder in dotnet/runtime. NFC. * [wasm] Implement support for pinvoke callbacks in the interpeter. * Modify the tuner to generate a table of trampoline functions which have the same signature as the pinvoke callback methods. * These functions transfer control to the interpreter. * Modify the interpreter/wasm runtime to look up the functions corresponding to the pinvoke callback methods. * [csproj] Update project files * Fix license. * Remove leftover debug code. Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-07-02[wasm][System.IO.Compression]: Disable BrotliStream on wasm. (#19961)Martin Baulig
* [wasm][System.IO.Compression]: Disable Brotli on wasm. * [csproj] Update project files Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-06-30[wasm] Optimize interp->native transitions. (#20034)Zoltan Varga
* [wasm] Optimize interp->native transitions. * Generate tables of signatures/transition functions. * Add mono_wasm_get_interp_to_native_trampoline () function to look up the transition function for a signature. * Cache the transition function in a imethod->method_data slot. Previously, we were calling a mono_wasm_interp_to_native_trampoline () function and a generated icall_trampoline_dispatch () function which added a lot of overhead. * Avoid sharing cache entries.
2020-06-24[mcs] Fix help text for default value of -sdk: option (#20011)Steffen Kieß
The `mcs` help text says that it will use the value `4.5` by default for the option `-sdk:`, but it actually uses `4.x`. Fix the help text.
2020-06-24[wasm] Missing signatures for Microsoft.Extensions.EventSource (#20017)Alexander Köplinger
Fixes tests in dotnet/runtime that currently fail with `WASM-ERR: CANNOT HANDLE COOKIE VL`.
2020-06-24[WASM] Missing signatures for OpenGLES (#20001)David Ávila
* Added missing signatures for OpenGLES/WebGL * Remove duplicated signatures * Update Wasm_m2n_invoke.g.h to include new signatures
2020-06-12[merp] Add API methods for getting hashcode/reason of last crash (#19901)Alexis Christoforides
* [merp] Add API methods for getting hashcode/reason of last crash * Add test * Review feedback and cleanup
2020-06-09[wasm] Throw PlatformNotSupportedException instead of NotSupportedException ↵Zoltan Varga
when starting threads/waiting on monitors. (#19937) * [wasm] Throw PlatformNotSupportedException instead of NotSupportedException when starting threads/waiting on monitors. * Preseve PlatformNotSupportedException.
2020-06-05[wasm] Fix icall linking with netcore. (#19917)Zoltan Varga
2020-05-30[wasm] Print a warning in the pinvoke generator if multiple incompatible ↵Zoltan Varga
declarations would be emitted, and error (#19873) out at runtime. Fixes https://github.com/mono/mono/issues/19869.
2020-05-27[wasm] Include the pinvoke table into a separate file, so the generated ↵Zoltan Varga
declarations don't conflict with the ones in the header files included by driver.c. (#19853) Fixes https://github.com/mono/mono/issues/19837.
2020-05-20Always include Unicode charinfo, so tar made in csc mode works in mcs mode ↵Jo Shields
(#19807) As-is, a tarball created in Roslyn mode is missing the file charinfo.nlp, which mcs needs to build the classlib.
2020-05-18[corlib] Improve RuntimeThread stub (#19782)w-flo
The only call site of RuntimeThread.InitializeThreadPoolThread() is in ThreadPoolCallbackWrapper, and it needs to return a valid RuntimeThread reference to prevent a NullReferenceException later on. So return `new RuntimeThread (null)` instead of a null reference. This fixes a wine-mono crash I have encountered in "ZUSI 3 - Aerosoft Edition" (in ZusiDisplay), and it might fix mono bug #17994.
2020-05-12[debugger] Merge debugger-libs/Mono.Debugger.Soft (#19725)Thays Grazia
Trying to make mono/debugger-libs/Mono.Debugger.Soft be the same as mono/mono/mcs/class/Mono.Debugger.Soft Relates to https://github.com/mono/debugger-libs/pull/323 * Bump API snapshot submodule Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-05-04[Mono.Debugger.Soft] Fixed NRE in MethodMirror.FullName when param_info is ↵Jeffrey Stedfast
not yet cached (#19675) If param_info has not yet been fetched, then the FullName property will throw a NRE when accessed. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1112185/
2020-05-03[Wasm] Additional signatures for SkiaSharp interop (#19671)Jérôme Laban
2020-05-01[wasm] Integrate the m2n-gen.cs tool into mcs/tools/wasm-tuner. (#19680)Zoltan Varga
* [wasm] Integrate the m2n-gen.cs tool into mcs/tools/wasm-tuner. It should be ran as: mono wasm-tuner.exe --gen-interp-to-native <output file name> <extra assemblies>. The <extra assemblies> will be searched for pinvoke methods, and their signatures will be added to the set of supported signatures. * [csproj] Update project files Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-04-28Fix if already send error to http client, do not callback. (#19664)Junil Um
Fixed #10435 HttpListener already closes the Response object, closes the HTTP Client connection, and then sets the value of Response.StatusCode again. If so, an ObjectDisposedException is thrown. ``` Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.HttpListenerResponse'. at System.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x00013] in <b4473693dd3c4d45883c574a53529fbe>:0 at MonoConsoleApp1.Program.Main (System.String[] args) [0x000f8] in <a66f6d7d417445dc9f89c691941ca70b>:0 at MonoConsoleApp1.Program.<Main> (System.String[] args) [0x0000c] in <a66f6d7d417445dc9f89c691941ca70b>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.HttpListenerResponse'. at System.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x00013] in <b4473693dd3c4d45883c574a53529fbe>:0 at MonoConsoleApp1.Program.Main (System.String[] args) [0x000f8] in <a66f6d7d417445dc9f89c691941ca70b>:0 at MonoConsoleApp1.Program.<Main> (System.String[] args) [0x0000c] in <a66f6d7d417445dc9f89c691941ca70b>:0 ``` If an error is sent to the HTTP client while processing a request, it is patched so that the next process is not executed anymore.
2020-04-24Prevent NullReferenceException in SurrogateProviderAdapter (#19362)vidir-svanberg
Prevents NullReferenceException in SurrogateProviderAdapter which occurred when SurrogateProviderAdapter is constructed with a null ISerializationSurrogateProvider instance, which results in NullReferenceException in GetDataContractType, GetDeserializedObject and GetObjectToSerialize.
2020-04-23[WinForms] Fix ListView GetItemAt high load (#19639)Александр Хухлаев
When ListView.VirtualMode = true GetItemAt should not access items collection directly to get bounds of ListViewItem. Otherwise, method OnRetrieveVirtualItem will be called. Which costs a lot of time.
2020-04-23[System.Runtime.Serialization] Work around `specified cast is not valid` ↵Mitchell Hwang
error (#19620) During json serialization, if the key was an enum type, then it would fail trying to cast into an XmlDictionaryString. The fix is to treat the enum value like a string.
2020-04-22[wasm] Add throwing PNSE to where currently disabled tests throw something ↵Maxim Lipnin
different (#19538) * Add throwing PNSE to where currently disabled tests throw something different * Add try-catch + PNSE to public SslStream ctor in case of WASM
2020-04-20[wasm] Reenable the managed collation code, link it out by default, add a ↵Zoltan Varga
packager option to enable it. (#19570) * [wasm] Reenable the managed collation code, link it out by default, add a packager option to enable it. * Disable some xunit tests which fail because the test runner can't handle the [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] attribute. * [csproj] Update project files Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-04-16Change OSPlatform for wasm to "BROWSER" rather than "WEBASSEMBLY"Larry Ewing
Following the guidance in https://github.com/dotnet/runtime/issues/33328 Change OSPlatform to BROWSER for wasm runtimeArchitecture.
2020-04-11[wasm][bcl] Handle correctly backslash in file name (#19488)Kenneth Pouncey
* [wasm][bcl] Handle correctly backslash in file name - Modify IO file to assign backslash to alternate directory separator by default - Add tests for issue https://github.com/mono/mono/issues/18933 * [wasm][tests] Skip two tests for wasm - After internal discussions decided to skip these two tests on wasm 1. GetDirectories_Backslash 1. GetFiles_Backslash * [wasm][tests] PathIsRooted tests failing - skip subtest #9 if WASM - To fix issue https://github.com/mono/mono/issues/18933 we set the AltDirectorySeparatorChar as well. This causes the `Assert.IsTrue (!Path.IsPathRooted ("\\"), "IsPathRooted #09");` to fail. Path.IsPathFullyQualified Method handles paths that use both the DirectorySeparatorChar and the AltDirectorySeparatorChar characters. * [wasm][tests] PathIsRooted tests failing - skip if WASM
2020-04-08[merp] Synchronize (serialize) calls to MERP API (#19429)Alexis Christoforides
Fixes https://github.com/mono/mono/issues/19406
2020-04-08Add BeginRead/BeginWrite/EndRead/EndWrite overloads back to SslStream (#19442)Filip Navara
* Add BeginRead/BeginWrite/EndRead/EndWrite overloads back to SslStream and underlying implementation. Unlike the default implementation in Stream it allows parallel read along with parallel write using the standard TaskToApm pattern (https://github.com/dotnet/runtime/issues/33447). This reverts part of https://github.com/mono/mono/pull/17393 which could lead to deadlocks as reported in https://github.com/mono/mono/issues/18865. * Move the TaskToApm pattern from MobileAuthenticatedStream to SslStream * Bump API snapshot submodule Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-04-08Fix WinForms LinkLabel drawing (#19386)Karl
MeasureCharacterRanges handles the alignment correctly by itself. This may have been to handle poor behaviour in libgdiplus, particularly when Pango text layout was not default.
2020-04-08Three small RichTextBox / TextControl fixes (#19401)Karl
1. Fix the height calculated by Line.RecalculatePasswordLine(). Would have been roughly double what it should have been - line spacing includes the height of the line. 2. In RichTextBox, insert a character for the Quote special character tags rather than just printing a message on the console. 3. In TextControl Document.Draw(), fix the criteria for skipping the last line. Could probably be improve further, but the previous had a problem because it could check with a point well off the bottom of the second to last line instead of its bottom. This probably arose because I had used line.Height for just the height of the text in the line, and later decided that it should be the entire height including all spacing, and added line.TextHeight. The earlier behaviour would have been wrong too, because it would have pointed to the bottom of the text, not the bottom of the line.
2020-04-08[Winforms] fix #18606 PropertyGrid didn`t edit value with ↵Александр Хухлаев
CustomTypeDescriptor (#19452) When using implemeted ICustomTypeDescriptor with overrided SetValue(object component, object value) and there value reference will be changed even if new object`s fields will be equals then in line current_changed = Object.Equals (properties[i].GetValue (propertyOwners[i]), value); will not detected change cause of references of object in operands are not equal. In usual ways references will be equal. So we compare old value ref with new value ref earlier. In .net winforms do same. And also original winforms did not check CanConvertFrom whith type of editable object. So we do not need block with converter.CanConvertFrom ((ITypeDescriptorContext)this, valueType)) Fixes #18606
2020-04-08[Winforms] PropertyGrid fix disappearing of items (#19453)Александр Хухлаев
When Category Name match with Item name this GridItem will disappear
2020-04-08[WinForms] Fix ToolStripTextBox Width (#19457)Александр Хухлаев
When set non-Empty Size to ToolStripTextBox it will appear with zero with, but must use width from size.
2020-04-08[WinForms] PropertyGrid must show value text even if CanConvertTo return ↵Александр Хухлаев
false (#19463) If we use PropertyDescriptor with Converter like this public class MyConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destType) { return false; } } GridEntry will not show text of Value which uses MyConverter. In .net they do not check CanConvertTo, they call ConvertToString directly.
2020-04-08[runtime] Fix Type.GetTypeCode () for generic enums. (#19470)Zoltan Varga
Fixes https://github.com/mono/mono/issues/17735.
2020-04-08Produce System.Net.Http.WebAssemblyHttpHandler (#19260)Pranav K
* Produce System.Net.Http.WebAssemblyMessageHandler * Branding changes for WebAssembly.Net.Http -> System.Net.Http.WebAssemblyMessageHandler * Change how fetch options are configured * Fixup tests * More fixup * Update submodule
2020-04-07When double buffering, flush the buffered graphics (#19460)Karl
Otherwise some stuff doesn't always get drawn. Fixes https://github.com/mono/libgdiplus/issues/640, and probably other similar things.