Closed Bug 693393 Opened 13 years ago Closed 13 years ago

Improve poor man's Maybe<AutoCompartment> in JSAutoEnterCompartment.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: justin.lebar+bug, Unassigned)

References

Details

(Whiteboard: [iOS])

Attachments

(1 file)

We currently size the storage inside JSAutoEnterCompartment based on a platform-specific guess.  This broke ted's iOS port, and it's ugly.

We may be able to rely on the fact (?) that 32-bit systems with alignof(uint64) == 4 have 13-word AutoCompartments, while 32-bit systems with alignof(uint64) == 8 have 16-word AutoCompartments.
Attached patch Patch v1Splinter Review
Comment on attachment 565995 [details] [diff] [review]
Patch v1

I think this works.
Attachment #565995 - Flags: review?(luke)
Attachment #565995 - Flags: review?(luke) → review+
Depends on: 691192
https://hg.mozilla.org/mozilla-central/rev/962683b9d15a
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Whiteboard: [inbound] → [inbound][iOS]
Whiteboard: [inbound][iOS] → [iOS]
Just for interest in case this dings other arches, on PPC this turned out to be 15 bytes, for some reason.
s/bytes/words/
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: