Delegate the handle-seek event of MDSM::SeekObject to a new SeekHandler object.

NEW
Unassigned

Status

()

Core
Audio/Video: Playback
P3
normal
10 months ago
7 months ago

People

(Reporter: kaku, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

10 months ago
Spawned from bug 1331070 comment 19.
(Reporter)

Comment 1

10 months ago
Not really sure if this is a good idea or not but give it a try.

There are some advantages:
(1) we can avoid some if-else statement in XXXState::HandleSeek().
(2) we can avoid the code duplication between different state's HandleSeek() handler.
Comment hidden (mozreview-request)
(Reporter)

Comment 3

10 months ago
Comment on attachment 8835369 [details]
Bug 1338084 - delegate the SeekObject::HandleSeek() to the new SeekHanlder class;

The drawback is that it's somewhat over-designed...
Attachment #8835369 - Flags: feedback?(jwwang)
(In reply to Tzuhao Kuo [:kaku] from comment #1)
Looks like an over-design to me.

> There are some advantages:
> (1) we can avoid some if-else statement in XXXState::HandleSeek().
Usually we want to apply virtual functions when there are over 3 cases. if-else only makes 2. It also kinda duplicates the purpose of HandleSeek() which is a virtual function and allows sub-classes to customize the behavior.

> (2) we can avoid the code duplication between different state's HandleSeek() handler.
The extra code introduced by the patch seems to outweigh the complexity reduced by duplicate code elimination.

Comment 5

10 months ago
mozreview-review
Comment on attachment 8835369 [details]
Bug 1338084 - delegate the SeekObject::HandleSeek() to the new SeekHanlder class;

https://reviewboard.mozilla.org/r/111048/#review112304
Attachment #8835369 - Flags: review-
Attachment #8835369 - Flags: feedback?(jwwang) → feedback-
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.