Merge pull request #2530 from lambdageek/monoerror-mono_string_new
authormonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 3 Feb 2016 06:45:23 +0000 (06:45 +0000)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 3 Feb 2016 06:45:23 +0000 (06:45 +0000)
commitac32aa114ab7cca67498ae8da30188bbbd8923f0
tree20daa442b8fe6df554c734909c19ccbae91e0b56
parentfcb3e8d26093a63d6924ee898fc7357d6e12f852
parent37630d26ddc20c13aa796c634c4bb0cb170e86da
Merge pull request #2530 from lambdageek/monoerror-mono_string_new

[runtime] Use MonoError for mono_string_new

We are refraining from changing runtime callers of `mono_string_new` to `mono_string_new_checked` in one commit. String creation is used in several hundred places and threading error handling through all the callers is very intrusive. Additionally, AFAIK the only error condition from mono_string_new is out-of-memory. In a lot of cases there's no way to meaningfully recover.

We should revisit individual callers when it makes sense, but just mechanically updating everywhere doesn't get us a lot of benefit.
mono/metadata/object-internals.h
mono/metadata/object.c