Closed
Bug 763704
Opened 12 years ago
Closed 6 years ago
DOMRequest callbacks should fire for launched mozApp
Categories
(Core Graveyard :: DOM: Apps, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mdas, Unassigned)
Details
In Gaia, we call launch() on the App, and get back a DOMRequest, but it doesn't fire the callbacks. For example, running something like this in the content space: window.wrappedJSObject.appscreen.getAppByOrigin('http://calculator.gaiamobile.org').launch(); returns a DOMRequest object, but if I do: window.wrappedJSObject.appscreen.getAppByOrigin('http://calculator.gaiamobile.org').launch(.onsuccess = function(){alert('App is launched!');}; The callback will never fire.
Reporter | ||
Comment 1•12 years ago
|
||
erm, weird typo: window.wrappedJSObject.appscreen.getAppByOrigin('http://calculator.gaiamobile.org').launch().onsuccess = function(){alert('App is launched!');};
Comment 2•12 years ago
|
||
Does launch() return a new object? Can that object get GCed?
Comment 3•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #2) > Does launch() return a new object? > > Can that object get GCed? Yes, it returns a DOMRequest.
Comment 4•12 years ago
|
||
That doesn't answer my second question. Can you point me to the launch() implementation, please?
Comment 5•12 years ago
|
||
It's there: http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.js#238 which uses http://mxr.mozilla.org/mozilla-central/source/dom/base/DOMRequestHelper.jsm#94 to create the DOMRequest using the DOMRequestService. The cause for the problem reported is known, we return the request object but never fire .onsuccess or .onerror on it.
Comment 6•12 years ago
|
||
Looking through that code, it looks at first glance like nothing holds on to the request, so can never fire an event on it, yeah....
Comment 7•12 years ago
|
||
We hold on to the request when calling getRequestId(). But even if we can fire events, we don't.
Updated•7 years ago
|
Product: Core → Core Graveyard
Comment 8•6 years ago
|
||
Core Graveyard / DOM: Apps is inactive. Closing all bugs in this component.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•