I have faced infinite recursion errors multiple times with Ext.clone trying to clone an object which contained circular references.

To avoid such situations, I think that it should check for clone, _clone or another suitably named method on an object and if available, use the return value of that object as the clone instead of setting out to recursively clone the object itself.

I currently use a work-around where Ext.clone checks for obj.nodeType and obj.cloneNode on an object (for dom nodes) and is both exist, uses obj.cloneNode instead for cloning. So I add a dummy value to nodeType for my objects containing circular references and then add a method cloneNode which returns the object itself to overcome current behavior of infinite recursion by Ext.clone.