Bug 121562 - [MSE] Implement support for SourceBuffer.remove()
Summary: [MSE] Implement support for SourceBuffer.remove()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-09-18 11:23 PDT by Jer Noble
Modified: 2014-03-28 13:09 PDT (History)
10 users (show)

See Also:


Attachments
Patch (22.54 KB, patch)
2013-09-18 11:29 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (16.02 KB, patch)
2014-03-28 11:25 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2013-09-18 11:23:58 PDT
[MSE] Implement support for SourceBuffer.remove()
Comment 1 Jer Noble 2013-09-18 11:29:56 PDT
Created attachment 212007 [details]
Patch
Comment 2 Eric Carlson 2013-11-05 13:55:45 PST
Comment on attachment 212007 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=212007&action=review

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:112
> +    // FIXME: Add step 6 text when mode attribute is implemented.

Nit: bug number?

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:170
> +void SourceBuffer::remove(double start, double end, ExceptionState& es)

I think this merge was a bit too automatic ;-). Don't you mean:

void SourceBuffer::remove(double start, double end, ExceptionCode& ec)

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:176
> +        es.throwDOMException(InvalidAccessError);

ec = INVALID_ACCESS_ERR;

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:184
> +        es.throwDOMException(InvalidStateError);

ec = INVALID_STATE_ERR;
Comment 3 Radar WebKit Bug Importer 2014-03-24 14:19:43 PDT
<rdar://problem/16410855>
Comment 4 Jon Lee 2014-03-25 09:32:26 PDT
ping?
Comment 5 Jer Noble 2014-03-28 11:25:30 PDT
Created attachment 228072 [details]
Patch

Clearing r+ flag; new patch is significantly different enough from previous patch to warrant re-review.
Comment 6 Eric Carlson 2014-03-28 11:34:50 PDT
Comment on attachment 228072 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228072&action=review

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:246
> +    m_source->openIfInEndedState();

You NULL check m_source above, do you need to so so here as well?
Comment 7 Jer Noble 2014-03-28 12:39:50 PDT
Comment on attachment 228072 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228072&action=review

>> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:246
>> +    if (isRemoved() || m_updating) {
>> +        ec = INVALID_ACCESS_ERR;
>> +        return;
>> +    }
>> +
>> +    // 5. If the readyState attribute of the parent media source is in the "ended" state then run the following steps:
>> +    // 5.1. Set the readyState attribute of the parent media source to "open"
>> +    // 5.2. Queue a task to fire a simple event named sourceopen at the parent media source .
>> +    m_source->openIfInEndedState();
> 
> You NULL check m_source above, do you need to so so here as well?

No, the isRemoved() statement above is effectively a NULL check.
Comment 8 WebKit Commit Bot 2014-03-28 13:09:16 PDT
Comment on attachment 228072 [details]
Patch

Clearing flags on attachment: 228072

Committed r166423: <http://trac.webkit.org/changeset/166423>
Comment 9 WebKit Commit Bot 2014-03-28 13:09:22 PDT
All reviewed patches have been landed.  Closing bug.