Closed Bug 606357 Opened 14 years ago Closed 14 years ago

Make JSD work properly with compartments

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- beta7+

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

(Whiteboard: [compartments])

Attachments

(1 file)

We need to make sure that we actually enter the right compartments in the right places.
At the very least, we need to go into jsd_val.c and make sure that we enter the right compartment.
blocking2.0: --- → ?
Attached patch Fixes v1Splinter Review
This is a first pass of things needed to fix this. The one thing I'm not thrilled about is that I had to fix getWrappedValue all the way out near the XPCOM layer; but by the time we read jsd_val.c from there, we've totally lost which compartment we were called from.
Attachment #485455 - Flags: review?(gal)
Attachment #485455 - Flags: review?(gal) → review+
Blake, are there any other fixes that still need to be made here?  In other words, does your first pass fix actually enable JSD to work properly with compartments or do we need more patches?
Blocking beta7.
blocking2.0: ? → beta7+
Is this ready to land?
(In reply to comment #5)
> Is this ready to land?

It did land:

http://hg.mozilla.org/mozilla-central/rev/dd34396ba8d8

But if I try to start a browser (built from m-c tip as of now) with the force-debug-mode patch on, I still get compartment-mismatch assertions:

Assertion failure: compartment mismatched, at c:\sources\mozilla-central\js\src\jscntxtinlines.h:513

Should I file a separate bug on this?
I filed bug 607174 on the remaining problems.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 617964
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: