I've been hitting an odd bug in the Web Inspector's TreeOutline (very old and stable code) that calls a function on this, but the this object inside the function is sometimes the window and not the 'this' from the callee. Changing the code from: this.onpopulate(); To: this.onpopulate.call(this); Which fixes it 100%. Otherwise it only works fine 95-99% of the time, and randomly seems to forget the 'this' object. This is with TOT r103101.
Obviously the callee has the right 'this' object, otherwise it would throw an exception calling "onpopulate". I haven't been able to narrow it down to a test case yet. If you want to reproduce it, contact me.
<rdar://problem/10592017>
Do you have regression range?
No, it isn't 100% reproducible so it would be time consuming to find the range.