Hi,

I've filed a ticket (#346) in lighthouse for this, but I thought perhaps others might be running into this as well and would appreciate a heads up.

You can easily cause an infinite recursion using setOptions if you have circular references in objects passed as options.

window.addEvent('load', function(){
    var a = {};
    var b = {};
    b.a = a;
    a.b = b;
    new C({a:a});
});
var C = new Class({
   Implements: [Options],
   options: {
       a: null
   },
   initialize: function(options){
       this.setOptions(options);
   }
});

I've tried quickly to fix this but $unlink is not for the faint of heart and I haven't had any real success yet. Actually, this is the first time I've reduced this to a simple test case so perhaps I will have more luck now :)

Cheers

Paul


Reply via email to