WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
74811
'this' object is sometimes the DOMWindow when it shouldn't be
https://bugs.webkit.org/show_bug.cgi?id=74811
Summary
'this' object is sometimes the DOMWindow when it shouldn't be
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
Add attachment
proposed patch, testcase, etc.
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
<
rdar://problem/10592017
>
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.
Top of Page
Format For Printing
XML
Clone This Bug