[webkit-reviews] review granted: [Bug 128886] DataCue.data should be a copy of the input ArrayBuffer, not a pointer : [Attachment 224366] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 17 07:51:30 PST 2014


Eric Carlson <eric.carlson at apple.com> has granted Brendan Long
<b.long at cablelabs.com>'s request for review:
Bug 128886: DataCue.data should be a copy of the input ArrayBuffer, not a
pointer
https://bugs.webkit.org/show_bug.cgi?id=128886

Attachment 224366: Patch
https://bugs.webkit.org/attachment.cgi?id=224366&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=224366&action=review


> Source/WebCore/html/track/DataCue.cpp:37
> +DataCue::DataCue(ScriptExecutionContext& context, double start, double end,
ArrayBuffer* data)

It doesn't look like "data" can ever be NULL, so this would be better as a
const reference: const ArrayBuffer& data

> Source/WebCore/html/track/DataCue.h:41
> +    static PassRefPtr<DataCue> create(ScriptExecutionContext& context,
double start, double end, ArrayBuffer* data)

Ditto.

> Source/WebCore/html/track/DataCue.h:50
> +    void setData(ArrayBuffer* data) { m_data = ArrayBuffer::create(data); }

Ditto.

> Source/WebCore/html/track/DataCue.h:54
> +    DataCue(ScriptExecutionContext&, double start, double end,
ArrayBuffer*);

Ditto.


More information about the webkit-reviews mailing list