diff --git a/content/base/public/File.h b/content/base/public/File.h index d705c16fbdc2..926ed0b69ce3 100644 --- a/content/base/public/File.h +++ b/content/base/public/File.h @@ -91,11 +91,17 @@ public: Create(nsISupports* aParent, const nsAString& aContentType, uint64_t aStart, uint64_t aLength); + // The returned File takes ownership of aMemoryBuffer. aMemoryBuffer will be + // freed by moz_free so it must be allocated by moz_malloc or something + // compatible with it. static already_AddRefed CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength, const nsAString& aName, const nsAString& aContentType, uint64_t aLastModifiedDate); + // The returned File takes ownership of aMemoryBuffer. aMemoryBuffer will be + // freed by moz_free so it must be allocated by moz_malloc or something + // compatible with it. static already_AddRefed CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength, const nsAString& aContentType);