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