Closed Bug 938889 Opened 11 years ago Closed 11 years ago

IdleService tries to set a pref from a content process when running tests on B2G emulator

Categories

(Core :: Widget, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
1.3 C1/1.4 S1(20dec)

People

(Reporter: reuben, Assigned: reuben)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 1 obsolete file)

See https://tbpl.mozilla.org/php/getParsedLog.php?id=30577161&tree=Pine&full=1#error1

FWIW, dom/permission/tests/test_idle.html runs earlier in the same chunk.
Blocks: 933355
I think this is the cause for the random orange on M4.
We should try to disable this test:
/tests/dom/permission/tests/test_idle.html
Flags: needinfo?(jgriffin)
Flags: needinfo?(ahalberstadt)
I've just disabled this on cedar.
I haven't seen this error since jgriffin disabled it. Was this debug only though? As I don't think it got disabled for opt yet.
Flags: needinfo?(ahalberstadt)
It looks like disabling that test did clear up M4, aside from the shutdown crash which bug 934009 addresses.
Flags: needinfo?(jgriffin)
Assignee: nobody → reuben.bmo
Whiteboard: [systemsfe]
Target Milestone: --- → 1.3 Sprint 6 - 12/6
I think this service, as it is, should only run in the master process. Child processes should simply forward their requests to the master.
At the very least, the daily stuff should just be disabled in child processes.
Something like this?

Keeping track of an id->pointer map in parent and child is a PITA, does anyonek now if there's an easier way to do that? Is sending |static_cast<intptr_t>(ptr)| too hacky?
Attachment #8346571 - Flags: feedback?(roc)
Comment on attachment 8346571 [details] [diff] [review]
Remote IdleService, disable idle-daily in content processes

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

This is good but I think we can simplify it a bit. Instead of allocating IDs in ContentChild and keeping an ID-to-observer map there, we can just have ContentChild::AddIdleObserver/RemoveIdleObserver cast the observer pointer to a uint64_t and forward directly to the parent. When notified by the parent, we just cast the uint64_t back to a pointer and notify on it. We have to trust the parent process anyway. ContentChild still needs to AddRef and Release the observer to maintain current lifetime semantics.
Attachment #8346571 - Flags: feedback?(roc) → feedback+
Nice, that makes things significantly simpler! I assumed sending pointers across processes would be frowned upon, but this makes a lot of sense :)
Attachment #8346571 - Attachment is obsolete: true
Attachment #8347034 - Flags: review?(roc)
Target Milestone: 1.3 Sprint 6 - 12/6 → 1.3 C1/1.4 S1(20dec)
https://hg.mozilla.org/mozilla-central/rev/70675d0a0533
Status: NEW → RESOLVED
Closed: 11 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: