Bug 1079141 - mDocument null check in nsScriptLoader::ReadyToExecuteScripts, r=bz, a=lsblakk