Bug 1082449 - Add memory ownership comment for CreateMemoryFile(). r=roc

This commit is contained in:
Alfredo Yang 2014-10-14 20:16:00 +02:00
parent e99836cad4
commit 63bc00c78b

View File

@ -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<File>
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<File>
CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength,
const nsAString& aContentType);