Closed Bug 1324335 Opened 3 years ago Closed 3 years ago

Make SeekJob::mTarget a Maybe<>

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(3 files)

http://searchfox.org/mozilla-central/rev/f680e72cc6579f90b992b63ca14d923d2afea612/dom/media/MediaDecoderStateMachine.cpp#2041

It is invalid to read mSeekJob.mTarget after mSeekJob.Resolve() is called at #2032 because SeekJob::Resolve() resets mTarget.

Changing SeekJob::mTarget to a Maybe<> will prevent such a misuse.
This issue is discovered by Dan.
Assignee: nobody → jwwang
Priority: -- → P3
Attachment #8819808 - Flags: review?(gsquelart)
Attachment #8819809 - Flags: review?(gsquelart)
Attachment #8819810 - Flags: review?(gsquelart)
Comment on attachment 8819808 [details]
Bug 1324335. Part 1 - give MozPromiseHolder a move constructor.

https://reviewboard.mozilla.org/r/99476/#review99768
Attachment #8819808 - Flags: review?(gsquelart) → review+
Comment on attachment 8819809 [details]
Bug 1324335. Part 2 - Make SeekJob::mTarget a Maybe<>.

https://reviewboard.mozilla.org/r/99478/#review99776
Attachment #8819809 - Flags: review?(gsquelart) → review+
Comment on attachment 8819810 [details]
Bug 1324335. Part 3 - cache mTarget before resetting it.

https://reviewboard.mozilla.org/r/99480/#review99778
Attachment #8819810 - Flags: review?(gsquelart) → review+
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b1c9fc080abf
Part 1 - give MozPromiseHolder a move constructor. r=gerald
https://hg.mozilla.org/integration/autoland/rev/3ef122da13fd
Part 2 - Make SeekJob::mTarget a Maybe<>. r=gerald
https://hg.mozilla.org/integration/autoland/rev/07eaefc44d99
Part 3 - cache mTarget before resetting it. r=gerald
You need to log in before you can comment on or make changes to this bug.