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

This commit is contained in:
Juan Gomez
2015-07-03 18:29:00 -07:00
parent 48c1574a1d
commit 89035d527e
202 changed files with 509 additions and 582 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;
}