|
828 | 828 | action='store_true', |
829 | 829 | dest='pointer_compression_shared_cage', |
830 | 830 | default=None, |
831 | | - help='[Experimental] Use V8 pointer compression with shared cage (requires --experimental-enable-pointer-compression)') |
| 831 | + help='[Experimental] Use V8 pointer compression with a shared cage and enable the V8 sandbox (requires --experimental-enable-pointer-compression)') |
832 | 832 |
|
833 | 833 | parser.add_argument('--v8-options', |
834 | 834 | action='store', |
@@ -2170,16 +2170,10 @@ def configure_v8(o, configs): |
2170 | 2170 | flavor not in ('aix', 'os400', 'zos') and |
2171 | 2171 | o['variables']['target_arch'] in maglev_enabled_architectures) |
2172 | 2172 | o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 |
2173 | | - # Using the sandbox requires always allocating array buffer backing stores in the sandbox. |
2174 | | - # We currently have many backing stores tied to pointers from C++ land that are not |
2175 | | - # even necessarily dynamic (e.g. in static storage) for fast communication between JS and C++. |
2176 | | - # Until we manage to get rid of all those, v8_enable_sandbox cannot be used. |
2177 | | - # Note that enabling pointer compression without enabling sandbox is unsupported by V8, |
2178 | | - # so this can be broken at any time. |
2179 | | - o['variables']['v8_enable_sandbox'] = 0 |
2180 | | - # We set v8_enable_pointer_compression_shared_cage to 0 always, even when |
2181 | | - # pointer compression is enabled so that we don't accidentally enable shared |
2182 | | - # cage mode when pointer compression is on. |
| 2173 | + # Like V8's own default, the sandbox goes with the shared pointer compression |
| 2174 | + # cage. Multi-cage builds give every IsolateGroup its own sandbox, which the |
| 2175 | + # array buffer allocator does not know about yet. |
| 2176 | + o['variables']['v8_enable_sandbox'] = 1 if options.pointer_compression_shared_cage else 0 |
2183 | 2177 | o['variables']['v8_enable_pointer_compression_shared_cage'] = 1 if options.pointer_compression_shared_cage else 0 |
2184 | 2178 | o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0 |
2185 | 2179 | o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 |
|
0 commit comments