Closed Bug 1082449 Opened 6 years ago Closed 6 years ago

Add memory ownership comment for CreateMemoryFile().

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: ayang, Assigned: ayang)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch add_comment_CreateMemoryFile (obsolete) — Splinter Review
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+
Update comment.
Attachment #8504629 - Attachment is obsolete: true
Attachment #8505215 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/422ce62454c6
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.