diff options
Diffstat (limited to 'deps/v8/src/wasm/wasm-memory.h')
-rw-r--r-- | deps/v8/src/wasm/wasm-memory.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/v8/src/wasm/wasm-memory.h b/deps/v8/src/wasm/wasm-memory.h index 5a919fe71c..5fb4554cc2 100644 --- a/deps/v8/src/wasm/wasm-memory.h +++ b/deps/v8/src/wasm/wasm-memory.h @@ -66,6 +66,18 @@ class WasmMemoryTracker { friend WasmMemoryTracker; }; + // Allow tests to allocate a backing store the same way as we do it for + // WebAssembly memory. This is used in unit tests for trap handler to + // generate the same signals/exceptions for invalid memory accesses as + // we would get with WebAssembly memory. + V8_EXPORT_PRIVATE void* TryAllocateBackingStoreForTesting( + Heap* heap, size_t size, void** allocation_base, + size_t* allocation_length); + + // Free memory allocated with TryAllocateBackingStoreForTesting. + V8_EXPORT_PRIVATE void FreeBackingStoreForTesting(base::AddressRegion memory, + void* buffer_start); + // Decreases the amount of reserved address space. void ReleaseReservation(size_t num_bytes); |