Bug 785744 - Async file picker cleanup. r=neil
This commit is contained in:
@@ -51,15 +51,16 @@ public:
|
||||
// It's possible that some widget implementations require GUI operations
|
||||
// to be on the main thread, so that's why we're not dispatching to another
|
||||
// thread and calling back to the main after it's done.
|
||||
int16_t result;
|
||||
int16_t result = nsIFilePicker::returnCancel;
|
||||
nsresult rv = mFilePicker->Show(&result);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("FilePicker's Show() implementation failed!");
|
||||
mCallback->Done(nsIFilePicker::returnCancel);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return mCallback->Done(result);
|
||||
if (mCallback) {
|
||||
mCallback->Done(result);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user