return !doc || !doc->GetScriptGlobalObject();
return !doc || !doc->GetWindow();
PRBool PresShell::InZombieDocument(nsIContent *aContent){  // If a content node points to a null document, or the document is not  // attached to a window, then it is possibly in a zombie document,  // about to be replaced by a newly loading document.  // Such documents cannot handle DOM events.  // It might actually be in a node not attached to any document,  // in which case there is not parent presshell to retarget it to.  nsIDocument *doc = aContent->GetDocument();  return !doc || !doc->GetScriptGlobalObject();}