Bug 1286190 - Get rid of MOZ_CHILD_PERMISSIONS r=bz

MozReview-Commit-ID: Lx2kozynptu
This commit is contained in:
Fabrice Desré
2016-04-05 13:34:53 +02:00
parent 638120420a
commit 51f3bfa03e
13 changed files with 18 additions and 845 deletions

View File

@@ -2165,23 +2165,7 @@ HTMLInputElement::GetValueInternal(nsAString& aValue) const
case VALUE_MODE_FILENAME:
if (nsContentUtils::LegacyIsCallerChromeOrNativeCode()) {
#ifndef MOZ_CHILD_PERMISSIONS
aValue.Assign(mFirstFilePath);
#else
// XXX We'd love to assert that this can't happen, but some mochitests
// use SpecialPowers to circumvent our more sane security model.
if (!mFilesOrDirectories.IsEmpty()) {
ErrorResult rv;
GetDOMFileOrDirectoryPath(mFilesOrDirectories[0], aValue, rv);
if (NS_WARN_IF(rv.Failed())) {
return rv.StealNSResult();
}
return NS_OK;
}
else {
aValue.Truncate();
}
#endif
} else {
// Just return the leaf name
if (mFilesOrDirectories.IsEmpty()) {
@@ -3350,7 +3334,6 @@ HTMLInputElement::AfterSetFilesOrDirectoriesInternal(bool aSetValueChanged)
formControlFrame->SetFormProperty(nsGkAtoms::value, readableValue);
}
#ifndef MOZ_CHILD_PERMISSIONS
// Grab the full path here for any chrome callers who access our .value via a
// CPOW. This path won't be called from a CPOW meaning the potential sync IPC
// call under GetMozFullPath won't be rejected for not being urgent.
@@ -3365,7 +3348,6 @@ HTMLInputElement::AfterSetFilesOrDirectoriesInternal(bool aSetValueChanged)
rv.SuppressException();
}
}
#endif
UpdateFileList();