Various fixes for browser chrome tests for same-compartment realms

RESOLVED FIXED in Firefox 66

Status

()

enhancement
P2
normal
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(7 attachments)

A bunch of relatively minor test and code changes to get these tests more green.
The code was trying to implement the getOwnPropertyDescriptor trap in terms of
getPropertyDescriptor, by comparing the "holder" object we found to the object
we did the lookup on. This becomes buggy when wrappers like WindowProxy are involved.

The patch removes this check and calls JS_GetOwnPropertyDescriptor instead of
JS_GetPropertyDescriptor.
With same-compartment chrome globals these would end up in the same compartment.
We need to prevent that because the debugger doesn't support it.

Depends on D15092
Priority: -- → P2
Keywords: leave-open
Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/12f69be06d1e
part 1 - Fix incorrect SandboxProxyHandler::getOwnPropertyDescriptor implementation. r=bzbarsky
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11d454511a09
part 2 - Fix test_bug1042436.xul to create the sandbox in a new compartment because Xray warning state is stored per compartment. r=bholley
https://hg.mozilla.org/integration/autoland/rev/4ebe565c65f9
part 3 - Fix some debugger tests by forcing separate compartments for the debugger and debuggee. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/93ce93d1510d
part 4 - Don't call FixWaiverAfterTransplant if JS_TransplantObject didn't change object identity. r=bholley
Changes the test to test both freshCompartment: true and freshCompartment: false
sandbox options.

There's one sub test that fails with same-copartment realms, I commented that
and added a weaker test for the same-compartment case.
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd13046c9317
part 5 - Fix test_bug771429.xul to work with same-compartment realms. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/d44fc9b89125
part 6 - Fix AddSizeOfTab to reserve number-of-realms instead of number-of-compartments in the realms Vector. r=bzbarsky
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d16d586f9cd
part 7 - Null out proxy1 and proxy2 in test_jsterm_autocomplete.html to fix a shutdown leak. r=jlast
Fingers crossed, but I think this is done.
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.