Bug 897399: handle the inner window disappearing after beforescriptexecute without crashing, r=sicking

--HG--
extra : transplant_source : %90GW%01%C7%BA%FB%3E%FF%8A%F2%EFf%E7%81%C6s%F6%E9%2B