Closed
Bug 990458
Opened 12 years ago
Closed 12 years ago
B2G RIL: replace the use of 'network-interface-state-changed' events with updateNetworkInterface() API.
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(tracking-b2g:backlog)
People
(Reporter: jessica, Assigned: jessica)
Details
(Whiteboard: [p=2])
Attachments
(5 files, 14 obsolete files)
|
2.67 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
|
1.85 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
|
3.63 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
|
1.85 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
|
12.78 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
This a follow-up to Bug 931348 comment 25 and 26.
We'd like to move the "network-interface-state-changed" notifications firing into NetworkManager. NetworkManager should fire the notifications when all the routes (default and extra) and DNSes are all set. Or better, we should change to use the new topic "network-connection-state-changed" instead and introduce the new API 'updateNetworkInterface(...)' in nsINetworkManager.
This proposal was not able to land cause it changes the current interface and we were at the end v1.3. I wonder if we can do it now?
| Assignee | ||
Comment 1•12 years ago
|
||
| Assignee | ||
Comment 2•12 years ago
|
||
| Assignee | ||
Comment 3•12 years ago
|
||
| Assignee | ||
Comment 4•12 years ago
|
||
| Assignee | ||
Comment 5•12 years ago
|
||
| Assignee | ||
Comment 6•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Summary: B2G RIL: move 'network-interface-state-changed' notifications firing to NetworkManager → B2G RIL: replace the use of 'network-interface-state-changed' events with updateNetworkInterface() API.
| Assignee | ||
Updated•12 years ago
|
Attachment #8402500 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402501 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402503 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402504 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402505 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402507 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402500 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402501 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402503 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402504 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402505 -
Flags: review?(vyang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8402507 -
Flags: review?(vyang)
| Assignee | ||
Comment 7•12 years ago
|
||
Cancelling review as we decided to fix bug 939046 first.
| Assignee | ||
Comment 9•12 years ago
|
||
This bug was originally filed to adopt a new API updateNetworkInterface() to notify state changes in network interfaces and let NetworkManager fire the 'network-interface-state-changed' after all the routes are set correclty (see comment 0).
Although, Bug 976897 introduced a new topic to prevent the race condition of setting routes and using network interfaces, I think we can still adopt the new API to avoid confusions. So, 'network-connection-state-changed' notifications are used to notify outer modules that the network interface is ready and this new API will be used only between network interfaces and NetworkManager.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jjong
| Assignee | ||
Comment 11•12 years ago
|
||
Refine comments.
Attachment #8460102 -
Attachment is obsolete: true
| Assignee | ||
Comment 15•12 years ago
|
||
Rebased. Part 6 is done already in Bug 939046 Part 2.a.
Attachment #8402505 -
Attachment is obsolete: true
Attachment #8402507 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8460104 -
Flags: review?(echen)
| Assignee | ||
Updated•12 years ago
|
Attachment #8460105 -
Flags: review?(echen)
| Assignee | ||
Updated•12 years ago
|
Attachment #8460106 -
Flags: review?(vchang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8460107 -
Flags: review?(vchang)
| Assignee | ||
Updated•12 years ago
|
Attachment #8460109 -
Flags: review?(echen)
Comment 16•12 years ago
|
||
Comment on attachment 8460104 [details] [diff] [review]
Part 1: add updateNetworkInterface() API in idl, v3.
Review of attachment 8460104 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you.
Attachment #8460104 -
Flags: review?(echen) → review+
Comment 17•12 years ago
|
||
Comment on attachment 8460105 [details] [diff] [review]
Part 2: ril changes to support updateNetworkInterface(), v2.
Review of attachment 8460105 [details] [diff] [review]:
-----------------------------------------------------------------
r=me, thank you.
Attachment #8460105 -
Flags: review?(echen) → review+
Comment 18•12 years ago
|
||
Comment on attachment 8460109 [details] [diff] [review]
Part 5: implement updateNetworkInterface() and remove network-interface-state-changed event, v2.
Review of attachment 8460109 [details] [diff] [review]:
-----------------------------------------------------------------
Please help to remove the addObserver()/removeObserver()/const for TOPIC_INTERFACE_STATE_CHANGED. Thank you.
::: dom/system/gonk/NetworkManager.js
@@ +310,5 @@
> Services.obs.notifyObservers(network, TOPIC_INTERFACE_REGISTERED, null);
> debug("Network '" + networkId + "' registered.");
> },
>
> + updateNetworkInterface: function (network) {
nit: no need to have a space between "function" and "("
Attachment #8460109 -
Flags: review?(echen)
| Assignee | ||
Comment 19•12 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #18)
> Comment on attachment 8460109 [details] [diff] [review]
> Part 5: implement updateNetworkInterface() and remove
> network-interface-state-changed event, v2.
>
> Review of attachment 8460109 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Please help to remove the addObserver()/removeObserver()/const for
> TOPIC_INTERFACE_STATE_CHANGED. Thank you.
Oh yes, thanks for reminding me this. :)
>
> ::: dom/system/gonk/NetworkManager.js
> @@ +310,5 @@
> > Services.obs.notifyObservers(network, TOPIC_INTERFACE_REGISTERED, null);
> > debug("Network '" + networkId + "' registered.");
> > },
> >
> > + updateNetworkInterface: function (network) {
>
> nit: no need to have a space between "function" and "("
will do.
| Assignee | ||
Comment 20•12 years ago
|
||
May I have your review again? Thanks.
Changes since v2:
- Address review comment 18: remove the addObserver()/removeObserver()/const for TOPIC_INTERFACE_STATE_CHANGED and the space between "function" and "(" in NetworkManager.js
- remove const for TOPIC_INTERFACE_STATE_CHANGED in marionette head.js
Attachment #8460109 -
Attachment is obsolete: true
Attachment #8462363 -
Flags: review?(echen)
Comment 21•12 years ago
|
||
Comment on attachment 8462363 [details] [diff] [review]
Part 5: implement updateNetworkInterface() and remove network-interface-state-changed event, v3.
Review of attachment 8462363 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/NetworkManager.js
@@ +307,5 @@
> Services.obs.notifyObservers(network, TOPIC_INTERFACE_REGISTERED, null);
> debug("Network '" + networkId + "' registered.");
> },
>
> + updateNetworkInterface: function(network) {
Ah, one more thing. The documentation says: "Throws an exception if the specified network interface object isn't registered", but I don't see this behavior. Is any reason?
((Sorry for doesn't point this out in the previous review))
| Assignee | ||
Comment 22•12 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #21)
> Comment on attachment 8462363 [details] [diff] [review]
> Part 5: implement updateNetworkInterface() and remove
> network-interface-state-changed event, v3.
>
> Review of attachment 8462363 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/system/gonk/NetworkManager.js
> @@ +307,5 @@
> > Services.obs.notifyObservers(network, TOPIC_INTERFACE_REGISTERED, null);
> > debug("Network '" + networkId + "' registered.");
> > },
> >
> > + updateNetworkInterface: function(network) {
>
> Ah, one more thing. The documentation says: "Throws an exception if the
> specified network interface object isn't registered", but I don't see this
> behavior. Is any reason?
> ((Sorry for doesn't point this out in the previous review))
Oh, I missed that part. :( Thanks for pointing it out.
Will upload another patch to address this.
| Assignee | ||
Comment 23•12 years ago
|
||
Changes since v3:
- throw exception if the network passed in updateNetworkInterface() is not an instance of Ci.nsINetworkInterface or it's not registered.
Attachment #8462363 -
Attachment is obsolete: true
Attachment #8462363 -
Flags: review?(echen)
Attachment #8462477 -
Flags: review?(echen)
Updated•12 years ago
|
Attachment #8460106 -
Flags: review?(vchang) → review+
Updated•12 years ago
|
Attachment #8460107 -
Flags: review?(vchang) → review+
Updated•12 years ago
|
Attachment #8462477 -
Flags: review?(echen) → review+
Comment 24•12 years ago
|
||
Looks good, thank you.
| Assignee | ||
Comment 25•12 years ago
|
||
Add r=edgar.
Attachment #8460104 -
Attachment is obsolete: true
Attachment #8463863 -
Flags: review+
| Assignee | ||
Comment 26•12 years ago
|
||
Add r=edgar.
Attachment #8460105 -
Attachment is obsolete: true
Attachment #8463864 -
Flags: review+
| Assignee | ||
Comment 27•12 years ago
|
||
Add r=vchang.
Attachment #8460106 -
Attachment is obsolete: true
Attachment #8463866 -
Flags: review+
| Assignee | ||
Comment 28•12 years ago
|
||
Add r=vchang.
Attachment #8460107 -
Attachment is obsolete: true
Attachment #8463867 -
Flags: review+
| Assignee | ||
Comment 29•12 years ago
|
||
Add r=edgar,vchang.
Attachment #8462477 -
Attachment is obsolete: true
Attachment #8463868 -
Flags: review+
| Assignee | ||
Comment 30•12 years ago
|
||
Thanks Vincent and Edgar.
try green: https://tbpl.mozilla.org/?tree=Try&rev=1c382bf6538e
| Assignee | ||
Comment 31•12 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/4fd359c17178
https://hg.mozilla.org/integration/b2g-inbound/rev/2be828e5fbd2
https://hg.mozilla.org/integration/b2g-inbound/rev/0531a7a7f17e
https://hg.mozilla.org/integration/b2g-inbound/rev/f03a68ec40ed
https://hg.mozilla.org/integration/b2g-inbound/rev/108f31c71a0b
| Assignee | ||
Updated•12 years ago
|
Whiteboard: [p=2]
Target Milestone: --- → 2.1 S2 (15aug)
Comment 32•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4fd359c17178
https://hg.mozilla.org/mozilla-central/rev/2be828e5fbd2
https://hg.mozilla.org/mozilla-central/rev/0531a7a7f17e
https://hg.mozilla.org/mozilla-central/rev/f03a68ec40ed
https://hg.mozilla.org/mozilla-central/rev/108f31c71a0b
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
You need to log in
before you can comment on or make changes to this bug.
Description
•