[Webkit-unassigned] [Bug 34679] New: Back Button from a different domain breaks certain var references.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Feb 6 04:42:08 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34679
Summary: Back Button from a different domain breaks certain var
references.
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
URL: http://benalman.com/code/projects/jquery-hashchange/ex
amples/bug-safari-back-from-diff-domain/
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: cowboy at rj3.net
This is somewhat hard to describe... but at least it's reproducible:
http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
The gist is, when you navigate to a different domain, and press the back
button, accessing 'loc.href' from reference 'var loc = window.location' is
sometimes broken. I don't know if this is a "location" thing or a general
"reference" thing, but it's totally broken here.
I have confirmed this behavior on machines other than mine, and in both Safari
4.0.4 and WebKit nightly r54415.
The following is explained at the example page, but I will include it here for
posterity.
This is the problematic code:
(function(window){
// A convenient shortcut.
var win_loc = window.location,
loc = location,
state;
(function loopy(){
console.log([
'win_loc.href: ' + typeof win_loc.href,
'loc.href: ' + typeof loc.href,
'location.href: ' + typeof location.href,
'window.location.href: ' + typeof window.location.href
].join(', '));
timeout_id = setTimeout( loopy, 1000 );
})();
})(this);
When you initially navigate to the page, this is logged:
win_loc.href: string, loc.href: string, location.href: string,
window.location.href: string
After visiting another domain, and pressing the back button, this is logged:
win_loc.href: undefined, loc.href: undefined, location.href: string,
window.location.href: string
So, there you go.
--
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