Bug 1286190 - Get rid of MOZ_CHILD_PERMISSIONS r=bz
MozReview-Commit-ID: Lx2kozynptu
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user