Defining getters and setters in javascript
<p>I am getting following error for the setter defined in the javascript: "RangeError: Maximum call stack size exceeded".</p>

<p>The code4 is as follows:  </p>

<p>setter defn :</p>

<pre><code>this.__defineSetter('_myList', function(list)  
        {
              log.debug("in setter ....");  
             if(this._myList == list)  
            {  
                 log.debug("in setter..");    
                 return;           

            }  
            this._myList = list;  
         });  
</code></pre>

<p>call:</p>

<pre><code>myMethod = function(msg)    
{  
  try  
    {       
     this.myList = msg.myList;  
    }catch(e)
    {
        log.debug("error in calling setter... " + e);
    }  
}
</code></pre>

<p>I am unable to figure out why is it going to infinite loop??  </p>
