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

--HG--
extra : transplant_source : %BF%DA%F2HS%3B%F6%E5%07%B7dL%D2%7E%B7%02%E6%8F%F1%81