Closed Bug 806185 Opened 13 years ago Closed 13 years ago

Error: "caller is undefined" in ActivitiesService.jsm, line 305

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

RESOLVED FIXED
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: ttaubert, Assigned: fabrice)

References

Details

Attachments

(1 file)

STR: 1) Open the contacts app 2) click an existing contact 3) click on the message icon to write a new text message You see the following error pop up: Error: "caller is undefined" {file: "resource://gre/modules/ActivitiesService.jsm" line: 305}] This is caused by this line: http://hg.mozilla.org/mozilla-central/annotate/3621795c03e1/dom/activities/src/ActivitiesService.jsm#l246 I don't know what's the appropriate behavior here. Should we just return when (!caller)?
blocking-basecamp: --- → ?
Component: Gaia → General
Assignee: nobody → fabrice
blocking-basecamp: ? → +
The SMS app does not specify "returnValue" for the "new" activity, so we bail out early at https://mxr.mozilla.org/mozilla-central/source/dom/activities/src/ActivitiesService.jsm#246 but then it sends a result at https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/sms.js#L1475 So my take is that: 1) we should return early when (!caller) 2) this means that the calling app is faulty, and we need to fix the sms app (either by adding "returnValue: true" in the manifest or by not doing a postResult)
Attached patch patchSplinter Review
I filed bug 806490 to get the sms app fixed. The gecko patch is enough to prevent errors, but the calling app may not receive what it expects.
Attachment #676253 - Flags: review?(clian)
Comment on attachment 676253 [details] [diff] [review] patch Review of attachment 676253 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/activities/src/ActivitiesService.jsm @@ +294,1 @@ > } Cool! I'd prefer: if (!caller) { debug("!! caller is null for msg.id=" + msg.id); return; } obsData = JSON.stringify({ ... }); but have no strong opinion if you like the original one. :D
Attachment #676253 - Flags: review?(clian) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: