Closed
Bug 801611
Opened 12 years ago
Closed 11 years ago
In some cases, WebApps require synchronous startup file I/O
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 838210
People
(Reporter: Yoric, Unassigned)
Details
(Whiteboard: [mentor=Yoric][lang=js])
Attachments
(1 file)
1.10 KB,
patch
|
mfinkle
:
review-
Yoric
:
feedback+
|
Details | Diff | Splinter Review |
I can see this at least in the mobile version: http://hg.mozilla.org/mozilla-central/annotate/942ed5747b63/mobile/android/chrome/content/browser.js#l7440 It is my understanding that these code paths are not used yet, but should be used within a few months. We should get rid of this.
Reporter | ||
Updated•12 years ago
|
Component: DOM: Apps → Web Apps
Product: Core → Firefox
QA Contact: jsmith
Reporter | ||
Updated•12 years ago
|
OS: Mac OS X → Android
Updated•12 years ago
|
Product: Firefox → Firefox for Android
QA Contact: jsmith → aaron.train
Updated•12 years ago
|
Component: Web Apps → General
QA Contact: aaron.train
Comment 1•12 years ago
|
||
What's the replacement for readInputStreamToString ?
Comment 2•12 years ago
|
||
Note that Webapps.jsm also uses the method in some startup code: http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm
Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #1) > What's the replacement for readInputStreamToString ? To read the contents of a file to a string, asynchronously, off main thread: let decoder = new TextDecoder(); // Can be reused OS.File.read(path).then( function onSuccess(array) { return decoder.decode(array); } );
Reporter | ||
Comment 5•12 years ago
|
||
Looks like I won't have time to do this. Rebranding as a mentored bug.
Assignee: dteller → nobody
Whiteboard: [mentor=Yoric][lang=js]
If I understand this bug correctly, the idea is to replace the synchronous call to readInputStreamToString with the async version?
Comment 7•11 years ago
|
||
Yep. To use TextDecoder, you may need to use OS.File.read() instead of what we do currently.
Ok, I think I understand. How can I tell that I've got it working? Will the application fail to startup or is there something specific I need to test for?
Comment 9•11 years ago
|
||
Given that this is in the install path, this will make tests fail.
Comment 10•11 years ago
|
||
Attachment #713596 -
Flags: review?
Comment 11•11 years ago
|
||
I've made an attempt at using the async loading mechanism. I'm not sure how to test that it is loading asynchronously, but running it on my phone does work. If this is the correct approach, I will do the same thing for Webapps.jsm
Reporter | ||
Comment 12•11 years ago
|
||
Comment on attachment 713596 [details] [diff] [review] First attempt at async loading Taking the r? for the time being.
Attachment #713596 -
Flags: review? → review?(dteller)
Reporter | ||
Comment 13•11 years ago
|
||
Comment on attachment 713596 [details] [diff] [review] First attempt at async loading Review of attachment 713596 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Passing to mfinkle. ::: mobile/android/chrome/content/browser.js @@ +8275,2 @@ > try { > + let decoder = new TextDecoder(); // Can be reused I guess that's a "could be reused", since you don't actually reuse it.
Attachment #713596 -
Flags: review?(mark.finkle)
Attachment #713596 -
Flags: review?(dteller)
Attachment #713596 -
Flags: feedback+
Comment 14•11 years ago
|
||
Yes, we can get rid of the comment. Should I try the same approach in Webapps.jsm? Or leave that as a separate bug? I'm not sure how I would go about testing any changes to Webapps.jsm
Comment 15•11 years ago
|
||
Comment on attachment 713596 [details] [diff] [review] First attempt at async loading I think bug 838210 is overlapping this bug/patch. This section of code has changed a good bit too and will need to be rebased. Take a look at bug 838210 to see if we can consolidate. r- until we are sure we want this patch alone.
Attachment #713596 -
Flags: review?(mark.finkle) → review-
Comment 16•11 years ago
|
||
I think this is a duplicate of bug 838210.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•