If the popup is from a third party domain (such as google.com), then you can't access the location.href property of the popup because of the "same origin policy".
If it's in the same domain, then you can get the URL by doing this on the parent window:
popUpWindow.location.href