A system (110, 500) comprising: a memory (124, 560) storing processor-executable process steps; and a processor to execute the processor-executable process steps to: receive a request from a first execution thread of a virtual machine (115, 532) to post a message to a second execution thread of a virtual machine (115, 532), a payload of the message comprising an object including a function and serialized text of the function; in response to the request: delete the function from the object to create a modified object; and call a method to post a second message to the second execution thread, a payload of the second message comprising the modified object and the serialized text of the function; receive a request from the second execution thread to handle the second message; deserialize the serialized text of the function; insert the deserialized text of the function into the modified object to generate a fourth object; call a handler to handle the second message, wherein a payload of the second message comprises the fourth object; and execute the function in the second execution thread. a memory (124, 560) storing processor-executable process steps; and a processor to execute the processor-executable process steps to: receive a request from a first execution thread of a virtual machine (115, 532) to post a message to a second execution thread of a virtual machine (115, 532), a payload of the message comprising an object including a function and serialized text of the function; in response to the request: delete the function from the object to create a modified object; and call a method to post a second message to the second execution thread, a payload of the second message comprising the modified object and the serialized text of the function; receive a request from the second execution thread to handle the second message; deserialize the serialized text of the function; insert the deserialized text of the function into the modified object to generate a fourth object; call a handler to handle the second message, wherein a payload of the second message comprises the fourth object; and execute the function in the second execution thread. receive a request from a first execution thread of a virtual machine (115, 532) to post a message to a second execution thread of a virtual machine (115, 532), a payload of the message comprising an object including a function and serialized text of the function; in response to the request: delete the function from the object to create a modified object; and call a method to post a second message to the second execution thread, a payload of the second message comprising the modified object and the serialized text of the function; delete the function from the object to create a modified object; and call a method to post a second message to the second execution thread, a payload of the second message comprising the modified object and the serialized text of the function; receive a request from the second execution thread to handle the second message; deserialize the serialized text of the function; insert the deserialized text of the function into the modified object to generate a fourth object; call a handler to handle the second message, wherein a payload of the second message comprises the fourth object; and execute the function in the second execution thread.