DecoderTemplate cleanup
Categories
(Core :: Audio/Video: Web Codecs, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: chunmin, Assigned: chunmin)
References
Details
Attachments
(5 files)
There are some unused code, unnecessary comments, and wrong names of something in the DecoderTemplate.
Assignee | ||
Comment 1•1 year ago
|
||
ScheduleReportError
and ErrorRunnable
are unused in the code.
Assignee | ||
Comment 2•1 year ago
|
||
Some names of the runnables dispatched by QueueATask are not being
described correctly.
Depends on D197630
Assignee | ||
Comment 3•1 year ago
|
||
Depends on D197631
Assignee | ||
Comment 4•1 year ago
|
||
The pattern below in DecoderTemplate.cpp
a = A();
b = a && B();
c = a && b && C()
if (!a || !b || !c) {
if (!a) {
err_msg = "...";
} else if (!b) {
err_msg = "...";
} else if (!c) {
err_msg = "...";
}
log(err_msg);
// other error handling ...
}
can be simplified into
err_msg = ""; // empty string
if (!A()) {
err_msg = "...";
} else if (!B()) {
err_msg = "...";
} else if (!C()) {
err_msg = "...";
}
if (!err_msg.is_empty()) {
log(err_msg);
// other error handling ...
}
so there is no boolean dependencies among a
, b
, and c
, and makes
the code more maintainable.
Depends on D197632
Comment 5•1 year ago
|
||
ScheduleReportError()
unused since https://hg.mozilla.org/mozilla-central/rev/8b5620d3d4bb#l1.12
Assignee | ||
Comment 6•1 year ago
|
||
This patch minimizes MOZ_CAN_RUN_SCRIPT* annotations.
Depends on D197633
Assignee | ||
Comment 7•1 year ago
|
||
Comment 9•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1dc05423a75d
https://hg.mozilla.org/mozilla-central/rev/feca1fd6db8e
https://hg.mozilla.org/mozilla-central/rev/e48fdcb19862
https://hg.mozilla.org/mozilla-central/rev/9073381a5e74
https://hg.mozilla.org/mozilla-central/rev/c4d0e3a2fb08
Description
•