Add memory ownership comment for CreateMemoryFile().

RESOLVED FIXED in mozilla36

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: ayang, Assigned: ayang)

Tracking

unspecified
mozilla36
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Comment 1

4 years ago
Created attachment 8504629 [details] [diff] [review]
add_comment_CreateMemoryFile
Assignee: nobody → ayang
Attachment #8504629 - Flags: review?(roc)
Comment on attachment 8504629 [details] [diff] [review]
add_comment_CreateMemoryFile

Review of attachment 8504629 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/public/File.h
@@ +90,5 @@
>    static already_AddRefed<File>
>    Create(nsISupports* aParent, const nsAString& aContentType, uint64_t aStart,
>           uint64_t aLength);
>  
> +  // The returned File takes ownership of aMemoryBuffer.

Also mention that aMemoryBuffer will be freed by moz_free so it must have been allocated by moz_malloc or something compatible with it.
Attachment #8504629 - Flags: review?(roc) → review+
(Assignee)

Comment 3

4 years ago
Created attachment 8505215 [details] [diff] [review]
add_comment_CreateMemoryFile

Update comment.
Attachment #8504629 - Attachment is obsolete: true
Attachment #8505215 - Flags: review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/422ce62454c6
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.