Closed
Bug 1268803
Opened 9 years ago
Closed 9 years ago
Make sure BroadcastChannel are separated by userContextId
Categories
(Core :: DOM: Security, defect)
Core
DOM: Security
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jhao, Assigned: jhao)
References
(Blocks 1 open bug)
Details
(Whiteboard: [userContextId][OA][domsecurity-active])
Attachments
(1 file, 2 obsolete files)
3.70 KB,
patch
|
jhao
:
review+
|
Details | Diff | Splinter Review |
I tried to write a test for bug 1260907, but later I realized my test actually tests BroadcastChannel's postMessage, instead of window-to-window postMessage. Therefore, I open this bug for that.
Assignee | ||
Updated•9 years ago
|
Whiteboard: [userContextId][OA]
Assignee | ||
Comment 1•9 years ago
|
||
Hi baku, may I ask you to review this patch? Thanks.
Attachment #8746991 -
Flags: review?(amarchesini)
Assignee | ||
Comment 2•9 years ago
|
||
Removed trailing spaces.
Attachment #8746992 -
Flags: review?(amarchesini)
Assignee | ||
Updated•9 years ago
|
Attachment #8746991 -
Attachment is obsolete: true
Attachment #8746991 -
Flags: review?(amarchesini)
Updated•9 years ago
|
Whiteboard: [userContextId][OA] → [userContextId][OA][domsecurity-active]
Comment 3•9 years ago
|
||
Comment on attachment 8746992 [details] [diff] [review]
Make sure BroadcastChannels are separated by userContextId
Review of attachment 8746992 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/contextualidentity/test/browser/browser_postMessage.js
@@ +21,5 @@
> +
> +add_task(function* setup() {
> + // make sure userContext is enabled.
> + SpecialPowers.pushPrefEnv({"set": [
> + ["privacy.userContext.enabled", true]
There is a better way to do it. What about this:
add_task(function* setup() {
yield new Promise((resolve) => {
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true],
]}, resolve);
});
});
Maybe file a bug to fix all the existing contextual identity browser tests.
If we do that, we can remove cleanup().
@@ +28,5 @@
> +
> +add_task(function* cleanup() {
> + // make sure we don't leave any prefs set for the next tests
> + registerCleanupFunction(function() {
> + SpecialPowers.popPrefEnv();
remove this one. We don't need it if we use pushPrefEnv.
Attachment #8746992 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Thanks, baku.
I addressed your comments. I also added some comments in the test, and change the filename from browser_postMessage.js to browser_broadcastchannel.js to avoid confusion.
Assignee | ||
Updated•9 years ago
|
Attachment #8746992 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8748040 -
Flags: review+
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 7•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•9 years ago
|
Blocks: ContextualIdentity
You need to log in
before you can comment on or make changes to this bug.
Description
•