Patent ID: 8826306

Claim:
A method for passing a data item to and obtaining the data item from a scripting environment that is hosted by a host environment, the data item being referenced by a script being executed by the scripting environment, the method comprising: passing from the host environment a host environment representation of the data item to the scripting environment, the host environment representation of the data item being a representation of the data item that is not referenced by the script being executed by the scripting environment; receiving at the host environment a data structure from the scripting environment that includes the host environment representation of the data item and an indicator; determining at the host environment whether the scripting environment has modified the data item based on a state of the indicator included in the data structure; in response to determining that the scripting environment has not modified the data item, obtaining, at the host environment, the host environment representation of the data item from the data structure for use in one or more processing steps subsequently performed by the host environment; and in response to determining that the scripting environment has modified the data item, obtaining, at the host environment, a host environment representation of the modified data item for use in the processing step(s), wherein obtaining the host environment representation of the modified data item comprises converting a scripting environment representation of the modified data item included in the data structure into the host environment representation of the modified data item.