[Webkit-unassigned] [Bug 29871] New: window.self is set to window
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 29 07:05:17 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29871
Summary: window.self is set to window
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebCore JavaScript
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: spamfaenger at gmx.de
Strangely enough window.self is existing and points back to window - this has
the unfortunate side effect that the very common pattern of doing
var self = this;
function callback(someValue) {
self.value = someValue;
}
fails in often very subtle ways if one mistypes or forgets self in the initial
assignment.
This error would be much easier to spot, if window.self would return
'undefined'.
(Also I think that the dom spec doesn't entail window.self to be set - Firefox
for example doesn't have it.
Please also be aware that this variable actually also exists already in Safari
4.0.3
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list