Closed
Bug 1222247
Opened 9 years ago
Closed 9 years ago
[e10s] SpecialPowers.addPermission() is racy
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(e10s+)
RESOLVED
DUPLICATE
of bug 951272
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
SpecialPowers.addPermission sends a sync message to the parent, which is good, but the parent process permission manager then sends an async message to the child processes to update their copies of the permissions store. This does not affect test code that calls SpecialPowers.hasPermission(), because that asks the parent process, but any C++ code that checks permissions can end up with the old version of the permission. The SpecialPowers code should probably take a promise or callback thing, observe perm-changed and wait for the permission it set, then trigger the callback. An example of a test that fails in e10s due to this is dom/workers/test/test_xhr_parameters.html.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → continuation
tracking-e10s:
--- → ?
Comment 1•9 years ago
|
||
Isn't that why people should use pushPermissions?
Assignee | ||
Comment 2•9 years ago
|
||
Yeah, I didn't see that before.
Assignee | ||
Comment 3•9 years ago
|
||
Maybe I could just add a warning to this interface when it used in a content process. I also added a note to the "e10s test tips" wiki page.
Comment 4•9 years ago
|
||
See also bug 951272, we had some volunteers working on this code for a while and then it got stalled. But this is definitely causing intermittent failures sometimes.
Updated•9 years ago
|
Blocks: e10s-tests
Assignee | ||
Comment 5•9 years ago
|
||
I guess this bug isn't too useful.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•