nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(doc->GetScriptGlobalObject());
nsPIDOMWindow *domWindow = doc->GetWindow();
nsTextInputListener::UpdateTextInputCommands(const nsAString& commandsToUpdate){  nsIContent* content = mFrame->GetContent();  NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);    nsCOMPtr<nsIDocument> doc = content->GetDocument();  NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);  nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(doc->GetScriptGlobalObject());  NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE);  return domWindow->UpdateCommands(commandsToUpdate);}