Bug 9761 said that converting from JS to Java with target type java.lang.Object should produce a String object. This is actually more general, other types also need to be converted to appropriate objects.
*** Bug 35203 has been marked as a duplicate of this bug. ***
Created attachment 49139 [details]
Comment on attachment 49139 [details]