Closed Bug 694643 Opened 14 years ago Closed 14 years ago

fetching of manifests in owa extension

Categories

(Web Apps :: Extension, defect, P1)

x86
macOS
defect

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); }
Component: OpenWebApps → Extension
Priority: -- → P2
Product: Mozilla Labs → Web Apps
QA Contact: openWebApps → extension
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.
Priority: P2 → P1
Assignee: nobody → anant
Blocks: 698879
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Attachment #579840 - Flags: review?(ianb) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: