Closed Bug 1453437 Opened 6 years ago Closed 6 years ago

return UniquePtr from MediaRawData::CreateWriter

Categories

(Core :: Audio/Video, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

Returning UniquePtr is nicer than returning raw pointers, and has the
nice side effect of forcing us to clean up the uses of nsAutoPtr that
were hanging about.
Kind of wonder whether MediaRawDataWriter should be heap-allocated at all, but
perhaps that is a cleanup for another time.
Attachment #8967108 - Flags: review?(gsquelart)
Comment on attachment 8967108 [details] [diff] [review]
return UniquePtr from MediaRawData::CreateWriter

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

Thank you for scratching that itch.

Unimportant nit:

::: dom/media/MediaData.h
@@ +701,5 @@
>  
>    // Return a deep copy or nullptr if out of memory.
>    virtual already_AddRefed<MediaRawData> Clone() const;
> +  // Create a MediaRawDataWriter for this MediaRawData. The writer is not
> +  // thread-safe

You've lost the final '.' in the rewrite.
Attachment #8967108 - Flags: review?(gsquelart) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa7373395767
return UniquePtr from MediaRawData::CreateWriter; r=gerald
https://hg.mozilla.org/mozilla-central/rev/aa7373395767
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: