|
754 | 754 | action='store_true', |
755 | 755 | dest='pointer_compression_shared_cage', |
756 | 756 | default=None, |
757 | | - help='[Experimental] Use V8 pointer compression with shared cage (requires --experimental-enable-pointer-compression)') |
| 757 | + help='[Experimental] Use V8 pointer compression with a shared cage and enable the V8 sandbox (requires --experimental-enable-pointer-compression)') |
758 | 758 |
|
759 | 759 | parser.add_argument('--v8-options', |
760 | 760 | action='store', |
@@ -1952,16 +1952,10 @@ def configure_v8(o, configs): |
1952 | 1952 | o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and |
1953 | 1953 | o['variables']['target_arch'] in maglev_enabled_architectures) |
1954 | 1954 | o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 |
1955 | | - # Using the sandbox requires always allocating array buffer backing stores in the sandbox. |
1956 | | - # We currently have many backing stores tied to pointers from C++ land that are not |
1957 | | - # even necessarily dynamic (e.g. in static storage) for fast communication between JS and C++. |
1958 | | - # Until we manage to get rid of all those, v8_enable_sandbox cannot be used. |
1959 | | - # Note that enabling pointer compression without enabling sandbox is unsupported by V8, |
1960 | | - # so this can be broken at any time. |
1961 | | - o['variables']['v8_enable_sandbox'] = 0 |
1962 | | - # We set v8_enable_pointer_compression_shared_cage to 0 always, even when |
1963 | | - # pointer compression is enabled so that we don't accidentally enable shared |
1964 | | - # cage mode when pointer compression is on. |
| 1955 | + # Like V8's own default, the sandbox goes with the shared pointer compression |
| 1956 | + # cage. Multi-cage builds give every IsolateGroup its own sandbox, which the |
| 1957 | + # array buffer allocator does not know about yet. |
| 1958 | + o['variables']['v8_enable_sandbox'] = 1 if options.pointer_compression_shared_cage else 0 |
1965 | 1959 | o['variables']['v8_enable_pointer_compression_shared_cage'] = 1 if options.pointer_compression_shared_cage else 0 |
1966 | 1960 | o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0 |
1967 | 1961 | o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 |
|
0 commit comments