Closed Bug 1416085 Opened 7 years ago Closed 7 years ago

Use Span<> to replace low level pointer arithmetic in MediaCacheStream::Read()

Categories

(Core :: Audio/Video: Playback, defect, P3)

58 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox58 --- wontfix
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → jwwang
Blocks: 1355409
Priority: -- → P3
Attachment #8927692 - Flags: review?(bechen)
Comment on attachment 8927692 [details]
Bug 1416085 - use Span<> to replace low level pointer arithmetic in Read().

https://reviewboard.mozilla.org/r/198970/#review204028
Attachment #8927692 - Flags: review?(bechen) → review+
Attachment #8927692 - Flags: review?(gsquelart)
Comment on attachment 8927692 [details]
Bug 1416085 - use Span<> to replace low level pointer arithmetic in Read().

https://reviewboard.mozilla.org/r/198970/#review204256

::: dom/media/MediaCache.cpp:2568
(Diff revision 1)
> +    }
>  
> -      // See if the data is available in the partial cache block of any
> -      // stream reading this resource. We need to do this in case there is
> -      // another stream with this resource that has all the data to the end of
> -      // the stream but the data doesn't end on a block boundary.
> +    // See if we can use the data in the partial block of any stream reading
> +    // this resource. Note we use the partial block only when it is completed,
> +    // that is reaching EOS.
> +    bool foundDataInPartialBLock = false;

'foundDataInPartialBLock' -> 'foundDataInPartialBlock' ('L' in 'Block' should not be capitalized)

::: dom/media/MediaCache.cpp:2587
(Diff revision 1)
> -        // Break for we've reached EOS and have nothing more to read.
> -        break;
> +      break;
> -      }
> +    }
>  
> -      if (mStreamOffset != streamOffset) {
> +    if (mStreamOffset != streamOffset) {
> -        // Updat mStreamOffset before we drop the lock. We need to run
> +      // Updat mStreamOffset before we drop the lock. We need to run

'Updat' -> 'Update' (mis-fix of a recent nit!)
Attachment #8927692 - Flags: review?(gsquelart) → review+
Thanks for the reviews!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/05f87748526f
use Span<> to replace low level pointer arithmetic in Read(). r=bechen,gerald
https://hg.mozilla.org/mozilla-central/rev/05f87748526f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Depends on: 1491132
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: