Factor out code to read raw resources

RESOLVED FIXED in Firefox 31

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: lucasr, Assigned: lucasr)

Tracking

unspecified
Firefox 31
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

So that we can reuse it. Planning to use this code in the suggested sites infra.
Blocks: 994195
Comment on attachment 8404074 [details] [diff] [review]
Factor out method to load raw resource (r=margaret)

No functional changes, just moved code to a separate class.
Attachment #8404074 - Flags: review?(margaret.leibovic)
Comment on attachment 8404075 [details] [diff] [review]
Improve code for reading raw resources (r=margaret)

- Ensures the stream is closed.
- Avoids allocating a new String instances on each loop iteration.
Attachment #8404075 - Flags: review?(margaret.leibovic)
FYI: I've added tests for RawResource (bug 994195) but we'll need to tweak some stuff in the build infrastructure (bug 994135) in order to make it happen.
Attachment #8404074 - Flags: review?(margaret.leibovic) → review+
Attachment #8404075 - Flags: review?(margaret.leibovic) → review+
https://hg.mozilla.org/mozilla-central/rev/2d750966825d
https://hg.mozilla.org/mozilla-central/rev/f6e8cdd02ef7
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
You need to log in before you can comment on or make changes to this bug.