InvalidProgramException on Windows Phone on Emitted function call

Feb 16, 2012 at 11:49 PM


I am using a ported version of JINT on Windows Phone.

Apparently, WP7.1 supports Emit, and so the code seems to be running. However, I am getting an InvalidProgramException when trying to call a method on an object I SetParameter'ed.

The method gets wrapped here:

ProxyHelper.cs:         public JsMethodImpl WrapMethod(MethodInfo info, bool passGlobal) {

And the exception (InvalidProgramException) gets raised here:

NativeMethod.cs:   public override JsInstance Execute(Jint.Expressions.IJintVisitor visitor, JsDictionaryObject that, JsInstance[] parameters)

I am assuming that the emitted code is incompatible with SilverLight, but not sure why.. So wondering if someone can point me at where to start debugging it.