Should both of them reference the same object?
Yes, they are the same. It's one of the many historical quirks in the browser JS API. Try doing:
window.location === document.location