B2G RIL: Give message.type a better name to avoid conflicts

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: philikon, Assigned: philikon)

Tracking

Other Branch
mozilla17
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When we send messages from ril_worker to RadioInterfaceLayer and back, we use the `.type` attribute in the JSON payload to decide what kind of message it is. This can easily conflict with code that actually wants to use the `type` attribute itself. I think we already have one potential conflict in some SIM I/O code, others are just waiting to happen (I kind of walked into that trap just now doing some refactoring.)
Created attachment 648066 [details] [diff] [review]
v1
Attachment #648066 - Flags: review?(marshall)
Comment on attachment 648066 [details] [diff] [review]
v1

Review of attachment 648066 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! r+ with either removing the change to pdptype, or updating the other references (see comments below)

::: dom/system/gonk/RadioInterfaceLayer.js
@@ +1601,5 @@
>                               apn: apn,
>                               user: user,
>                               passwd: passwd,
>                               chappap: chappap,
> +                             pdprilMessageType: pdptype});

Hrm, it looks like you didn't update ril_worker's setupDataCall to use pdprilMessageType (line 1826ish). Maybe a case of overzealous search/replace? :)

Also, if we are changing this property, it should probably be camelCase for consistency

::: dom/system/gonk/ril_worker.js
@@ +2434,4 @@
>          newDataCall.user = newDataCallOptions.user;
>          newDataCall.passwd = newDataCallOptions.passwd;
>          newDataCall.chappap = newDataCallOptions.chappap;
>          newDataCall.pdptype = newDataCallOptions.pdptype;

This would also need to be updated to reflect the pdprilMessageType change.
Attachment #648066 - Flags: review?(marshall) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/63ee77218fad
Target Milestone: --- → mozilla17

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/63ee77218fad
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.