Closed
Bug 522764
Opened 15 years ago
Closed 15 years ago
COWs need tests
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | final-fixed |
People
(Reporter: avarma, Assigned: avarma)
Details
Attachments
(1 file)
9.03 KB,
patch
|
mrbkap
:
review+
jst
:
approval1.9.2+
|
Details | Diff | Splinter Review |
COWs need a test suite to ensure that they expose properties as per our specification (see bug 518991).
Assignee | ||
Comment 1•15 years ago
|
||
I've got a 17-test suite in a patch against trunk here: http://hg.mozilla.org/users/avarma_mozilla.com/cow-patches/file/df226305b064/cow_tests_3.patch However, there's a notable TODO in it. At the moment, because it's not yet possible to create a COW from script, I've added a method called GetCOWForObject() to nsIDOMWindowUtils. This method should only be callable from mochitest pages with UniversalXPConnect privileges, but right now the patch disables this functionality because it prevents a content-space Components.utils.Sandbox() from being able to make COWs. There's different ways we can get around this. One, which is mentioned in the patch, may be to make GetCOWForObject() a factory method that checks for UniversalXPConnect and then returns a function for creating COWs. Another option is to figure out exactly what's causing the privilege-checking code to fail when uncommented and fixing it, if that's possible (if it is, I don't know how to accomplish it). If we want to do the former, I can add the functionality to the patch.
Assignee | ||
Comment 2•15 years ago
|
||
Fixed this problem after talking to mrbkap and finding out that we can just enable UniversalXPConnect in the getCOW() function that's injected into the sandbox; UniversalXPConnect doesn't leak b/c it goes away once the stack frame it was enabled in disappears. Latest patch is now here: http://hg.mozilla.org/users/avarma_mozilla.com/cow-patches/file/9e232a2d8276/cow_tests_3.patch
Assignee | ||
Comment 3•15 years ago
|
||
nsDOMWindowUtils::getCOWForObject() now takes a scope parameter, as per mrbkap's suggestion: http://hg.mozilla.org/users/avarma_mozilla.com/cow-patches/file/309eb898fadc/cow_tests_3.patch
Assignee | ||
Comment 4•15 years ago
|
||
This patch is taken from: http://hg.mozilla.org/users/avarma_mozilla.com/cow-patches/file/ffc79bd95c2b/cow_tests_3.patch
Attachment #406791 -
Flags: review?(mrbkap)
Comment 5•15 years ago
|
||
Comment on attachment 406791 [details] [diff] [review] Patch for this bug. Looks good.
Attachment #406791 -
Flags: review?(mrbkap) → review+
Comment 6•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8976e1704153 with a new iid for nsIDOMWindowUtils.
Assignee: nobody → avarma
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•15 years ago
|
||
Blake, shouldn't this get pushed to the 1.9.2 branch to ensure that COWs work on it, since COW support is in 1.9.2?
Comment 8•15 years ago
|
||
jst, in order to get this on 1.9.2, do we need to make an nsIDOMWindowUtils_1_9_2?
Flags: wanted1.9.2?
Comment 9•15 years ago
|
||
Comment on attachment 406791 [details] [diff] [review] Patch for this bug. It would be good to get tests for COWs on the 1.9.2 branch. I talked with jst, who said not to worry about the interface change.
Attachment #406791 -
Flags: approval1.9.2?
Comment 10•15 years ago
|
||
Comment on attachment 406791 [details] [diff] [review] Patch for this bug. a=jst with a new iid on 1.9.2 as well.
Attachment #406791 -
Flags: approval1.9.2? → approval1.9.2+
Comment 11•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/6c6104362063
status1.9.2:
--- → final-fixed
Updated•8 years ago
|
Flags: wanted1.9.2?
You need to log in
before you can comment on or make changes to this bug.
Description
•