Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj

This commit is contained in:
Juan Gomez
2015-06-24 14:11:00 -04:00
parent 90f3162b9e
commit 7323e89a40
201 changed files with 506 additions and 579 deletions

View File

@@ -746,7 +746,7 @@ UploadLastDir::FetchDirectoryAndDisplayPicker(nsIDocument* aDoc,
new UploadLastDir::ContentPrefCallback(aFilePicker, aFpCallback);
#ifdef MOZ_B2G
if (XRE_GetProcessType() == GeckoProcessType_Content) {
if (XRE_IsContentProcess()) {
prefCallback->HandleCompletion(nsIContentPrefCallback2::COMPLETE_ERROR);
return NS_OK;
}
@@ -777,7 +777,7 @@ UploadLastDir::StoreLastUsedDirectory(nsIDocument* aDoc, nsIFile* aDir)
}
#ifdef MOZ_B2G
if (XRE_GetProcessType() == GeckoProcessType_Content) {
if (XRE_IsContentProcess()) {
return NS_OK;
}
#endif
@@ -2105,7 +2105,7 @@ HTMLInputElement::MozSetFileArray(const Sequence<OwningNonNull<File>>& aFiles)
void
HTMLInputElement::MozSetFileNameArray(const Sequence< nsString >& aFileNames, ErrorResult& aRv)
{
if (XRE_GetProcessType() == GeckoProcessType_Content) {
if (XRE_IsContentProcess()) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return;
}