I am getting following error for the setter defined in the javascript: "RangeError: Maximum call stack size exceeded".
The code4 is as follows:
setter defn :
this.__defineSetter('_myList', function(list)
{
log.debug("in setter ....");
if(this._myList == list)
{
log.debug("in setter..");
return;
}
this._myList = list;
});
call:
myMethod = function(msg)
{
try
{
this.myList = msg.myList;
}catch(e)
{
log.debug("error in calling setter... " + e);
}
}
I am unable to figure out why is it going to infinite loop??
__defineSetter()has been deprecated: developer.mozilla.org/en/JavaScript/Reference/Global_Objects/… i would avoid these APIs if i were you