In bug 44494 someone added a parameter to ExportAddressBook so that they could pass it to a file picker. They decided to use a parameter of type nsIDOMWindowInternal, convert it to a script global object, get the doc shell from that, and get an nsIDOMWindow from the doc shell. This sequence is somewhat circumlocutive, as the same object that implements nsIDOMWindowInternal also implements nsIDOMWindow, particularly since one indirectly inherits from the other. However there is no reason not to pass an nsIDOMWindow directly.
Created attachment 169725 [details] [diff] [review] Proposed patch
Fix checked in.