Back in the days before do_QueryObject, you had to write:
nsCOMPtr<nsIFoo> = do_QueryInterface(static_cast<nsIBar>(someVariableOfAConcreteType));
These days, you can just write:
nsCOMPtr<nsIFoo> = do_QueryObject(someVariableOfAConcreteType);
The MXR query shows some usages that haven't been converted, and I'm pretty sure all of them can be converted.