Open Bug 1392177 Opened 7 years ago Updated 2 years ago

Refactor ByteReader so it could return error.

Categories

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

enhancement

Tracking

()

People

(Reporter: ayang, Unassigned)

References

Details

The way ByteReader is supposed to work is using this pattern: if (!byteReader.CanRead32()) return false; uint32_t value = byteReader.ReadU32(); An optional type would avoid this kind of mistake: if (!byteReader.CanRead16()) return false; uint32_t value = byteReader.ReadU32(); But it would otherwise be pretty much open to the same mistake of forgetting the error check. Having said that, it is better from a type safety point of view.
Priority: -- → P3
Summary: Refactory ByteReader so it could return error. → Refactor ByteReader so it could return error.
Blocks: 1411525
No longer blocks: 1411525
Depends on: 1411525
Depends on: 1411815
Depends on: 1411821
Depends on: 1411824
Depends on: 1412177
Depends on: 1412183
Depends on: 1412216
Depends on: 1413076
Depends on: 1414742
Depends on: 1419682
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.