* Treat null string as null objects
}
[Fact]
+ public static void MarshalNullStringToCS()
+ {
+ HelperMarshal._stringResource = null;
+ Runtime.InvokeJS("App.call_test_method(\"InvokeString\", [ null ])");
+ Assert.Null(HelperMarshal._stringResource);
+ }
+
+ [Fact]
public static void MarshalStringToJS()
{
HelperMarshal._marshalledString = HelperMarshal._stringResource = null;
},
js_string_to_mono_string: function (string) {
- if (typeof (string) === "symbol")
+ if (string === null)
+ return null;
+ else if (typeof (string) === "symbol")
return this.js_string_to_mono_string_interned (string);
else if (typeof (string) !== "string")
throw new Error ("Expected string argument");