At the moment, it's possible for us to have a docshell with no document loaded in it (due to our frame recursion protection or due to the document not having had time to load yet). When this happens, for the docshell that doesn't have a document loaded in it window.location will throw on being set (because there is no inner window). If window.document.location is set instead, things work, since we synthesize an about:blank document.
12 years ago
So I guess what it comes down to is that we may need to synthesize inner windows (with an about:blank document) as needed...
Fixed by mrbkap, over to him to mark fixed for branches etc.
Fixed on trunk and MOZILLA_1_8_BRANCH by the checkin for bug 304882.
Verified FIXED using build 2005-08-27-05 SeaMonkey trunk on the testcase in Windows XP.