Should both of them reference the same object?
document.location.constructor === window.location.constructor is true.
document.location.constructor === window.location.constructor
true
It's because it's exactly the same object as you can see from document.location===window.location.
document.location===window.location
So there's no need to compare the constructor or any other property.