Bug 74811
Summary: | 'this' object is sometimes the DOMWindow when it shouldn't be | ||
---|---|---|---|
Product: | WebKit | Reporter: | Timothy Hatcher <timothy> |
Component: | JavaScriptCore | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Timothy Hatcher
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
<rdar://problem/10592017>
Simon Fraser (smfr)
Do you have regression range?
Timothy Hatcher
No, it isn't 100% reproducible so it would be time consuming to find the range.