Closed Bug 1053733 Opened 10 years ago Closed 10 years ago

[Settings] SettingManager is unable to receive message sent from SettingsChangeNotifier if SettingManager is initialized before SettingsChangeNotifier

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
2.1 S3 (29aug)
feature-b2g 2.1
tracking-b2g backlog

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(1 file, 1 obsolete file)

I meet this issue when working on bug 843452, please see bug 843452 comment #183. It is 100% reproducible on test_webapps_actor.html mochitest test with applying patches of bug 843452. SettingsManager sends Settings:RegisterForMessages in it's init process, but SettingsChangeNotifier may not yet be initialized and SettingsChangeNotifier lost this register message. Sometime it can be recovered if someone calls AddObserver. But if AddObserver is never be called, SettingsManager is unable to receive messages from SettingsChangeNotifier.
Assignee: nobody → echen
Blocks: 843452, 918528
(In reply to Edgar Chen [:edgar][:echen] from comment #0) > I meet this issue when working on bug 843452, please see bug 843452 comment > #183. > It is 100% reproducible on test_webapps_actor.html mochitest test with > applying patches of bug 843452. > > SettingsManager sends Settings:RegisterForMessages in it's init process, but > SettingsChangeNotifier may not yet be initialized and SettingsChangeNotifier > lost this register message. > > Sometime it can be recovered if someone calls AddObserver. But if > AddObserver is never be called, SettingsManager is unable to receive > messages from SettingsChangeNotifier. Or addObserver is called before SettingsChangeNotifier is ready.
Attached patch Patch, v1 (obsolete) — Splinter Review
Comment on attachment 8472986 [details] [diff] [review] Patch, v1 We don't know when SettingChangeNotifier is ready for receiving register event. It seems a new message is needed for notifying SettingChangeNotifier is ready. And SettingManager can send register message again when receiving it. Hi Gregor, may I have your feedback for this patch? Thank you
Attachment #8472986 - Flags: feedback?(anygregor)
Set feature-b2g as 2.1 because it blocks bug 843452
blocking-b2g: --- → backlog
feature-b2g: --- → 2.1
We are about to land bug 846200. Lets see if this is still necessary after we land.
Flags: needinfo?(kyle)
Yeah, we rip out SettingsChangeNotifier in bug 900551 (also landing ASAP), and it should now be handled by SettingsRequestManager. We bring up SettingsRequestManager in shell.js, but I'm not sure what the timing on that will be versus where you're registering for listeners.
Flags: needinfo?(kyle)
Comment on attachment 8472986 [details] [diff] [review] Patch, v1 (In reply to Gregor Wagner [:gwagner] from comment #5) > We are about to land bug 846200. Lets see if this is still necessary after > we land. (In reply to Kyle Machulis [:kmachulis] [:qdot] from comment #6) > Yeah, we rip out SettingsChangeNotifier in bug 900551 (also landing ASAP), > and it should now be handled by SettingsRequestManager. We bring up > SettingsRequestManager in shell.js, but I'm not sure what the timing on that > will be versus where you're registering for listeners. Thanks for this information, Kyle and Gregor. :) I will try it again after bug 900551 and bug 846200 is landed.
Attachment #8472986 - Flags: feedback?(anygregor)
Depends on: 900551
Target Milestone: --- → 2.1 S3 (29aug)
Hmm, I try to test this with applying patches of bug 846200 and bug 900551, but (In reply to Edgar Chen [:edgar][:echen] from comment #7) > Comment on attachment 8472986 [details] [diff] [review] > Patch, v1 > > (In reply to Gregor Wagner [:gwagner] from comment #5) > > We are about to land bug 846200. Lets see if this is still necessary after > > we land. > > (In reply to Kyle Machulis [:kmachulis] [:qdot] from comment #6) > > Yeah, we rip out SettingsChangeNotifier in bug 900551 (also landing ASAP), > > and it should now be handled by SettingsRequestManager. We bring up > > SettingsRequestManager in shell.js, but I'm not sure what the timing on that > > will be versus where you're registering for listeners. > > Thanks for this information, Kyle and Gregor. :) > > I will try it again after bug 900551 and bug 846200 is landed. Just for your information. I did not meet this issue any more after applying the patches of bug 846200 and bug 900551 [1]. Will try it again after they are ready in m-c. [1] https://hg.mozilla.org/integration/b2g-inbound/rev/82bed38ff50a
Hey Kyle, Can this patch be taken prior to bug 900551? This one blocks bug 843452 and bug 889737.
Flags: needinfo?(kyle)
Yeah, go ahead and land. We're hitting really bad problems with marionette webapi tests, so bug 900551 is blocked 'til we get those fixed. Hoping it's tomorrow, but don't want to hold up everyone waiting on that.
Flags: needinfo?(kyle)
Comment on attachment 8472986 [details] [diff] [review] Patch, v1 Hi Kyle, could you help to review this? Thank you :)
Attachment #8472986 - Flags: review?(kyle)
Attachment #8472986 - Flags: review?(kyle) → review+
Just carry r=qdot in comment title. Thank you, Kyle.
Attachment #8472986 - Attachment is obsolete: true
Attachment #8478878 - Flags: review+
Confirmed with EM/EPM, and this can be landed before FL.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
No longer depends on: 900551
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: