Bug 74811

Summary: 'this' object is sometimes the DOMWindow when it shouldn't be
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: barraclough, ggaren, mhahnenberg, msaboff, oliver, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Timothy Hatcher
Reported 2011-12-18 09:56:59 PST
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.
Attachments
Timothy Hatcher
Comment 1 2011-12-18 10:02:36 PST
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.
Timothy Hatcher
Comment 2 2011-12-18 11:44:49 PST
Simon Fraser (smfr)
Comment 3 2011-12-19 08:24:46 PST
Do you have regression range?
Timothy Hatcher
Comment 4 2011-12-19 08:53:57 PST
No, it isn't 100% reproducible so it would be time consuming to find the range.
Note You need to log in before you can comment on or make changes to this bug.