Last Comment Bug 693393 - Improve poor man's Maybe<AutoCompartment> in JSAutoEnterCompartment.
: Improve poor man's Maybe<AutoCompartment> in JSAutoEnterCompartment.
Status: RESOLVED FIXED
[iOS]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: general
:
: Jason Orendorff [:jorendorff]
Mentors:
: 693585 (view as bug list)
Depends on: 691192
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-10 12:27 PDT by Justin Lebar (not reading bugmail)
Modified: 2012-01-02 09:31 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.44 KB, patch)
2011-10-10 12:39 PDT, Justin Lebar (not reading bugmail)
luke: review+
Details | Diff | Splinter Review

Description Justin Lebar (not reading bugmail) 2011-10-10 12:27:28 PDT
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.
Comment 1 Justin Lebar (not reading bugmail) 2011-10-10 12:39:26 PDT
Created attachment 565995 [details] [diff] [review]
Patch v1
Comment 2 Justin Lebar (not reading bugmail) 2011-10-10 12:41:43 PDT
Comment on attachment 565995 [details] [diff] [review]
Patch v1

I think this works.
Comment 3 Justin Lebar (not reading bugmail) 2011-10-10 14:37:58 PDT
Thanks, Luke.

https://hg.mozilla.org/integration/mozilla-inbound/rev/962683b9d15a
Comment 4 Marco Bonardo [::mak] 2011-10-11 02:35:54 PDT
https://hg.mozilla.org/mozilla-central/rev/962683b9d15a
Comment 5 Jacek Caban 2011-10-11 07:15:49 PDT
*** Bug 693585 has been marked as a duplicate of this bug. ***
Comment 6 Cameron Kaiser [:spectre] 2012-01-02 09:30:58 PST
Just for interest in case this dings other arches, on PPC this turned out to be 15 bytes, for some reason.
Comment 7 Cameron Kaiser [:spectre] 2012-01-02 09:31:13 PST
s/bytes/words/

Note You need to log in before you can comment on or make changes to this bug.