Closed
Bug 694643
Opened 14 years ago
Closed 14 years ago
fetching of manifests in owa extension
Categories
(Web Apps :: Extension, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: onecyrenus, Assigned: anant)
References
Details
Attachments
(1 file)
This is the code, basically I worry that this isn't behind a timeout, and what is our strategy to catch exceptions when they happen at this level ?
function fetchManifest(url, cb) {
dump("APPS | api.install.fetchManifest | Fetching manifest from " + url + "\n");
// contact our server to retrieve the URL
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
createInstance(Ci.nsIXMLHttpRequest);
xhr.open("GET", url, true);
xhr.onreadystatechange = function(aEvt) {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
dump("APPS | api.install.fetchManifest | Got manifest (200) " + xhr.responseText.length + " bytes\n");
cb(xhr.responseText, xhr.getResponseHeader('Content-Type'));
} else {
dump("Failed to get manifest (" + xhr.status + ")\n");
cb(null);
}
}
};
xhr.send(null);
}
| Reporter | ||
Updated•14 years ago
|
Component: OpenWebApps → Extension
Priority: -- → P2
Product: Mozilla Labs → Web Apps
QA Contact: openWebApps → extension
Comment 1•14 years ago
|
||
it might be a good idea to adopt some code from
https://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/webapps/
as it seems to be handling errors better. Not sure if that would work in a timeline for alpha.
| Assignee | ||
Updated•14 years ago
|
Priority: P2 → P1
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → anant
| Assignee | ||
Comment 3•14 years ago
|
||
Attachment #579840 -
Flags: review?(ianb)
| Assignee | ||
Comment 4•14 years ago
|
||
r+'ed on IRC: https://github.com/mozilla/openwebapps/commit/4686fe763ceb5ba20f96539d542abd8416d01fb7
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Reporter | ||
Updated•14 years ago
|
Status: RESOLVED → VERIFIED
Updated•14 years ago
|
Attachment #579840 -
Flags: review?(ianb) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•