Bug 1047483 - patch 5 - Remove 'name' in the FilePropertyBag dictionary, r=smaug

This commit is contained in:
Andrea Marchesini 2014-10-08 17:15:23 +01:00
parent a1e153cad8
commit b975bc974a
5 changed files with 22 additions and 16 deletions

View File

@ -55,6 +55,7 @@ class FileInfo;
};
struct BlobPropertyBag;
struct ChromeFilePropertyBag;
struct FilePropertyBag;
class FileImpl;
@ -176,21 +177,21 @@ public:
static already_AddRefed<File>
Constructor(const GlobalObject& aGlobal,
File& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
// File constructor - ChromeOnly
static already_AddRefed<File>
Constructor(const GlobalObject& aGlobal,
const nsAString& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
// File constructor - ChromeOnly
static already_AddRefed<File>
Constructor(const GlobalObject& aGlobal,
nsIFile* aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;

View File

@ -631,7 +631,7 @@ File::Constructor(
/* static */ already_AddRefed<File>
File::Constructor(const GlobalObject& aGlobal,
File& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv)
{
if (!nsContentUtils::IsCallerChrome()) {
@ -653,7 +653,7 @@ File::Constructor(const GlobalObject& aGlobal,
/* static */ already_AddRefed<File>
File::Constructor(const GlobalObject& aGlobal,
nsIFile* aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv)
{
if (!nsContentUtils::IsCallerChrome()) {
@ -677,7 +677,7 @@ File::Constructor(const GlobalObject& aGlobal,
/* static */ already_AddRefed<File>
File::Constructor(const GlobalObject& aGlobal,
const nsAString& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv)
{
if (!nsContentUtils::IsCallerChrome()) {

View File

@ -236,7 +236,7 @@ MultipartFileImpl::GetMozFullPathInternal(nsAString& aFilename,
void
MultipartFileImpl::InitializeChromeFile(File& aBlob,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv)
{
NS_ASSERTION(!mImmutable, "Something went wrong ...");
@ -268,7 +268,7 @@ MultipartFileImpl::InitializeChromeFile(File& aBlob,
void
MultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
nsIFile* aFile,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
bool aIsFromNsIFile,
ErrorResult& aRv)
{
@ -340,7 +340,7 @@ MultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
void
MultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
const nsAString& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv)
{
nsCOMPtr<nsIFile> file;

View File

@ -67,17 +67,17 @@ public:
ErrorResult& aRv);
void InitializeChromeFile(File& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
void InitializeChromeFile(nsPIDOMWindow* aWindow,
const nsAString& aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
void InitializeChromeFile(nsPIDOMWindow* aWindow,
nsIFile* aData,
const FilePropertyBag& aBag,
const ChromeFilePropertyBag& aBag,
bool aIsFromNsIFile,
ErrorResult& aRv);

View File

@ -10,9 +10,9 @@ interface nsIFile;
ScalarValueString fileName, optional FilePropertyBag options),
// These constructors are just for chrome callers:
Constructor(Blob fileBits, optional FilePropertyBag options),
Constructor(nsIFile fileBits, optional FilePropertyBag options),
Constructor(ScalarValueString fileBits, optional FilePropertyBag options),
Constructor(Blob fileBits, optional ChromeFilePropertyBag options),
Constructor(nsIFile fileBits, optional ChromeFilePropertyBag options),
Constructor(ScalarValueString fileBits, optional ChromeFilePropertyBag options),
Exposed=(Window,Worker)]
interface File : Blob {
@ -28,11 +28,16 @@ interface File : Blob {
dictionary FilePropertyBag {
DOMString type = "";
DOMString name = ""; // TODO: to remove!
long long lastModified;
};
dictionary ChromeFilePropertyBag : FilePropertyBag {
DOMString name = "";
};
// Mozilla extensions
partial interface File {