Closed
Bug 1052096
Opened 10 years ago
Closed 10 years ago
Hoist CPOWs into the junk scopes of each process
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: billm, Assigned: bholley)
References
Details
Attachments
(4 files, 1 obsolete file)
2.57 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
5.81 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
3.25 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
6.91 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
Right now, if a CPOW is created in a given compartment, it lives there forever. Whoever else wants it gets a wrapper around it. Bobby pointed out that this is a problem for cross-domain content compartments, where the second compartment won't be able to use the CPOW at all.
We really need to have a separate CPOW in each compartment. This is how other kinds of wrappers work.
Reporter | ||
Comment 1•10 years ago
|
||
I wrote a patch for this and then tried to test it. However, I can't figure out how to get the test to fail without the patch, so I'm not sure how necessary this is.
Basically, we always receive the "initial" CPOW in some chrome compartment. And, whenever we operate on that CPOW, we'll always enter that chrome compartment to do it. Consequently, any new CPOWs derived from the original one will also be created in the same chrome compartment. So I think the "visibility" problem we were worried about, where a CPOW is created in a content compartment and then unusable by other content compartments, can't happen. Maybe I'm missing something though.
Despite all that, it seems better to have this than not to have it, so we might as well do it.
Attachment #8475566 -
Flags: review?(bobbyholley)
Reporter | ||
Comment 2•10 years ago
|
||
Oh, one thing this patch doesn't do is to have the PrepareForWrapping hook just make a new CPOW in the new compartment. Let me know if you want that Bobby.
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8475566 [details] [diff] [review]
per-comp-cpows
Bill and I decided that we should just require and assert that all CPOWs and all CPOW targets live in the junk scopes (privileged in the child, unprivileged in the parent).
Attachment #8475566 -
Flags: review?(bobbyholley) → review-
Assignee | ||
Comment 4•10 years ago
|
||
More specifically:
* Parent->Child CPOWs and their targets should live in the privileged junk scope.
* Child->Parent CPOWs should live in the privileged junk scope, and their target should live in the unprivileged junk scope.
Assignee | ||
Updated•10 years ago
|
Summary: Different compartments should get different CPOWs → Hoist CPOWs into the junk scopes of each process
Assignee | ||
Comment 5•10 years ago
|
||
Taking this, per IRC discussion with billm.
Assignee: wmccloskey → bobbyholley
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8488443 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8488444 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8488445 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8488446 -
Flags: review?(wmccloskey)
Assignee | ||
Updated•10 years ago
|
Attachment #8475566 -
Attachment is obsolete: true
Reporter | ||
Updated•10 years ago
|
Attachment #8488443 -
Flags: review?(wmccloskey) → review+
Reporter | ||
Updated•10 years ago
|
Attachment #8488444 -
Flags: review?(wmccloskey) → review+
Reporter | ||
Updated•10 years ago
|
Attachment #8488445 -
Flags: review?(wmccloskey) → review+
Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8488446 [details] [diff] [review]
Part 4 - Tests. v1
Review of attachment 8488446 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great! Thanks again.
Attachment #8488446 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 12•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/91520b12f0dc
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/71c10a155c9c
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/cdf9ce8f6228
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/727ee6032c7a
Comment 13•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/91520b12f0dc
https://hg.mozilla.org/mozilla-central/rev/71c10a155c9c
https://hg.mozilla.org/mozilla-central/rev/cdf9ce8f6228
https://hg.mozilla.org/mozilla-central/rev/727ee6032c7a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•