Closed
Bug 1071469
Opened 10 years ago
Closed 10 years ago
don't use 'jsval' in nsITelephonyService.idl
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S8 (7Nov)
People
(Reporter: vicamo, Assigned: jessica)
References
()
Details
Attachments
(4 files, 5 obsolete files)
2.97 KB,
patch
|
hsinyi
:
review+
|
Details | Diff | Splinter Review |
8.90 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
9.06 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
9.27 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #889737 +++ See bug 889737 comment 196.
Updated•10 years ago
|
Assignee: nobody → szchen
Comment 1•10 years ago
|
||
Use cloneInto. https://developer.mozilla.org/en-US/docs/Components.utils.cloneInto
Attachment #8493587 -
Flags: review?(vyang)
Comment 2•10 years ago
|
||
Great - Thanks for jumping on this Szu-Yu!
Assignee | ||
Comment 3•10 years ago
|
||
Per offline discussion, I will take it from here, it'd very similar to bug 1047196. :)
Assignee: szchen → jjong
Assignee | ||
Updated•10 years ago
|
Summary: don't use __exposedProps__ in MobileConnectionService.js → don't use 'jsval' in nsITelephonyService.idl
Updated•10 years ago
|
Attachment #8493587 -
Attachment is obsolete: true
Attachment #8493587 -
Flags: review?(vicamo)
Assignee | ||
Comment 4•10 years ago
|
||
Hi Hsinyi, may I have your review on this? Thanks.
Attachment #8514080 -
Flags: review?(htsai)
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Comment on attachment 8514080 [details] [diff] [review] Part 1: idl changes, v1. Review of attachment 8514080 [details] [diff] [review]: ----------------------------------------------------------------- Sweet !
Attachment #8514080 -
Flags: review?(htsai) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8514095 [details] [diff] [review] Part 2: dom changes, v1. Hi Olli, this is to remove jsval in nsITelephonyService.idl, very similar to what we've done in bug 1047196. After bug 1031175 is landed, we'll remove notifySendCancelMmi*() stuff in MobileConnection, see Bug 1070831. May I have your review? Thanks.
Attachment #8514095 -
Flags: review?(bugs)
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8514096 [details] [diff] [review] Part 3: ipc changes, v1. Hi Olli, this is to remove jsval in nsITelephonyService.idl, very similar to what we've done in bug 1047196. After bug 1031175 is landed, we'll remove notifySendCancelMmi*() stuff in MobileConnection, see Bug 1070831. May I have your review? Thanks.
Attachment #8514096 -
Flags: review?(bugs)
Assignee | ||
Comment 11•10 years ago
|
||
Comment on attachment 8514097 [details] [diff] [review] Part 4: gonk changes, v1. Edgar, may I have your review on this? Thanks.
Attachment #8514097 -
Flags: review?(echen)
Comment on attachment 8514096 [details] [diff] [review] Part 3: ipc changes, v1. >-using struct IPC::MozCallForwardingOptions from "mozilla/dom/mobileconnection/MobileConnectionIPCSerializer.h"; >+using nsMobileCallForwardingOptions from "mozilla/dom/mobileconnection/MobileConnectionIPCSerializer.h"; Looks like I had missed in some earlier review that nsMobileCallForwardingOptions is now some odd typedef. All those typedef nsIFoo* nsFoo; should be changed to something else. Perhaps typedef nsIFoo* nsIFooPtr; That can be done in a separate bug.
Attachment #8514096 -
Flags: review?(bugs) → review+
Comment on attachment 8514095 [details] [diff] [review] Part 2: dom changes, v1. It is not quite clear to me why we need this all, but using less jsval is always good! >+ nsTArray<MozCallForwardingOptions> additionalInformation; >+ for (uint32_t i = 0; i < aCount; i++) >+ { { should be in the previous line >+ MozCallForwardingOptions options; >+ int16_t pShort; >+ nsString pString; nsAutoString >+ bool pBool; give proper names for these pFoo. And declare just before using them (no need to reuse pShort for different things, just declare a new variable for each different case int16_t is use. That would be easier to read, I believe). And initialize int16_t and bool variables to something (nsAutoString is initialized to empty string by default). In theory nsIMobileCallForwardingOptions::GetActive and such might not set the out param to anything if the method throws. Those fixed, r+
Attachment #8514095 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 14•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #12) > Comment on attachment 8514096 [details] [diff] [review] > Part 3: ipc changes, v1. > > >-using struct IPC::MozCallForwardingOptions from "mozilla/dom/mobileconnection/MobileConnectionIPCSerializer.h"; > >+using nsMobileCallForwardingOptions from "mozilla/dom/mobileconnection/MobileConnectionIPCSerializer.h"; > Looks like I had missed in some earlier review that > nsMobileCallForwardingOptions is now some odd typedef. > > All those typedef nsIFoo* nsFoo; > should be changed to something else. > Perhaps > typedef nsIFoo* nsIFooPtr; > That can be done in a separate bug. Sure, filed bug 1093441.
Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #13) > Comment on attachment 8514095 [details] [diff] [review] > Part 2: dom changes, v1. > > It is not quite clear to me why we need this all, but using less > jsval is always good! The original purpose of this bug was to remove the use of '__exposedProps__', but since partner is requesting us to remove the use of 'jsval' in idls (see bug 1047196 comment 6), we decided to do it here directly. Doing this also avoids junk scope usage (see bug 1072710), so it's good overall. > > >+ nsTArray<MozCallForwardingOptions> additionalInformation; > >+ for (uint32_t i = 0; i < aCount; i++) > >+ { > { should be in the previous line > > >+ MozCallForwardingOptions options; > >+ int16_t pShort; > >+ nsString pString; > nsAutoString > > >+ bool pBool; > give proper names for these pFoo. > And declare just before using them (no need to reuse pShort for different > things, just declare a new variable for each different case int16_t is use. > That would be easier to read, I believe). > And initialize int16_t and bool variables to something (nsAutoString is > initialized to empty string by default). > In theory nsIMobileCallForwardingOptions::GetActive and such might not set > the out param to anything > if the method throws. > > Those fixed, r+ Thanks, will do.
Comment 16•10 years ago
|
||
Comment on attachment 8514097 [details] [diff] [review] Part 4: gonk changes, v1. Review of attachment 8514097 [details] [diff] [review]: ----------------------------------------------------------------- r=me with below comments addressed, thank you. ::: dom/telephony/gonk/TelephonyService.js @@ +143,1 @@ > } nit: }; @@ +712,5 @@ > response.timeSeconds, > response.serviceClass); > } > > if (response.additionalInformation != null) { !== null, here and http://dxr.mozilla.org/mozilla-central/source/dom/telephony/gonk/TelephonyService.js#687 @@ +722,5 @@ > } > } > > + // No additional information > + if (response.additionalInformation == undefined) { === undefined, then we won't have to worry about 0 equaling undefined. @@ +742,5 @@ > + array.length, array); > + return; > + } > + > + throw Cr.NS_ERROR_UNEXPECTED; don't need to throw an exception in sendWorkerMessage callback.
Attachment #8514097 -
Flags: review?(echen) → review+
Assignee | ||
Comment 17•10 years ago
|
||
Thanks Edgar for the review. (In reply to Edgar Chen [:edgar][:echen] from comment #16) > Comment on attachment 8514097 [details] [diff] [review] > Part 4: gonk changes, v1. > > Review of attachment 8514097 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me with below comments addressed, thank you. > > ::: dom/telephony/gonk/TelephonyService.js > @@ +143,1 @@ > > } > > nit: }; Will do. > > @@ +712,5 @@ > > response.timeSeconds, > > response.serviceClass); > > } > > > > if (response.additionalInformation != null) { > > !== null, here and > http://dxr.mozilla.org/mozilla-central/source/dom/telephony/gonk/ > TelephonyService.js#687 Hmm, 0 is not equalto (==) null, and if we use '!== null' here, if response.additionalInformation is undefined, it will meet this condition. Or we could change it to '!== undefined', as it is unlikely for it to be 'null'. > > @@ +722,5 @@ > > } > > } > > > > + // No additional information > > + if (response.additionalInformation == undefined) { > > === undefined, then we won't have to worry about 0 equaling undefined. same here. > > @@ +742,5 @@ > > + array.length, array); > > + return; > > + } > > + > > + throw Cr.NS_ERROR_UNEXPECTED; > > don't need to throw an exception in sendWorkerMessage callback. will call notifyDialMMISuccess(...) instead, what do you think?
Comment 18•10 years ago
|
||
(In reply to Jessica Jong [:jjong] [:jessica] from comment #17) > Thanks Edgar for the review. > > (In reply to Edgar Chen [:edgar][:echen] from comment #16) > > Comment on attachment 8514097 [details] [diff] [review] > > Part 4: gonk changes, v1. > > > > Review of attachment 8514097 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > r=me with below comments addressed, thank you. > > > > ::: dom/telephony/gonk/TelephonyService.js > > @@ +143,1 @@ > > > } > > > > nit: }; > > Will do. > > > > > @@ +712,5 @@ > > > response.timeSeconds, > > > response.serviceClass); > > > } > > > > > > if (response.additionalInformation != null) { > > > > !== null, here and > > http://dxr.mozilla.org/mozilla-central/source/dom/telephony/gonk/ > > TelephonyService.js#687 > > Hmm, 0 is not equalto (==) null, and if we use '!== null' here, if > response.additionalInformation is undefined, it will meet this condition. Or > we could change it to '!== undefined', as it is unlikely for it to be 'null'. Yes, you are right, 0 isn't equaling null. I am okay with `!= null` now. Thank you. :) > > > > > @@ +742,5 @@ > > > + array.length, array); > > > + return; > > > + } > > > + > > > + throw Cr.NS_ERROR_UNEXPECTED; > > > > don't need to throw an exception in sendWorkerMessage callback. > > will call notifyDialMMISuccess(...) instead, what do you think? Sounds good, go for it.
Assignee | ||
Comment 19•10 years ago
|
||
Changes since v1, see comment 13: - s/nsAutoString/nsString/ in NotifyDialMMISuccessWithCallForwardingOptions() - give proper variable names in NotifyDialMMISuccessWithCallForwardingOptions(), declare just before using them, initialize them and do not reuse them. - add r=smaug
Attachment #8514095 -
Attachment is obsolete: true
Attachment #8517278 -
Flags: review+
Assignee | ||
Comment 20•10 years ago
|
||
Add r=smaug
Attachment #8514096 -
Attachment is obsolete: true
Attachment #8517280 -
Flags: review+
Assignee | ||
Comment 21•10 years ago
|
||
- Add missing semicolon - no need to throw an exception in sendWorkerMessage callback, call notifyDialMMISuccess(...) instead. - Add r=echen
Attachment #8514097 -
Attachment is obsolete: true
Attachment #8517282 -
Flags: review+
Assignee | ||
Comment 22•10 years ago
|
||
Upload correct patch.
Attachment #8517282 -
Attachment is obsolete: true
Attachment #8517301 -
Flags: review+
Assignee | ||
Comment 23•10 years ago
|
||
try looks good: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=933b1e4e40e9
Assignee | ||
Comment 24•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/f327dea7ed2a https://hg.mozilla.org/integration/b2g-inbound/rev/a8c963537b31 https://hg.mozilla.org/integration/b2g-inbound/rev/47283ae4790a https://hg.mozilla.org/integration/b2g-inbound/rev/5dcbc1adfc59
Comment 25•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f327dea7ed2a https://hg.mozilla.org/mozilla-central/rev/a8c963537b31 https://hg.mozilla.org/mozilla-central/rev/47283ae4790a https://hg.mozilla.org/mozilla-central/rev/5dcbc1adfc59
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S8 (7Nov)
Updated•10 years ago
|
Blocks: b2g-ril-interface
You need to log in
before you can comment on or make changes to this bug.
Description
•