v8/test/mjsunit/wasm/shared-memory-worker-explicit-gc-stress.js
Adam Klein fafd7c5d22 [cleanup] Remove flag for Wasm threads & atomics
It's been enabled everywhere since Chrome 88, and the related
Chromium flag was removed in https://crrev.com/c/2886421.

Bug: v8:6532
Change-Id: I987a5761f9453d4e7d77d16199e8f0b3a659c70a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956131
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83809}
2022-10-19 23:05:37 +00:00

32 lines
1014 B
JavaScript

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-gc
d8.file.execute("test/mjsunit/worker-ping-test.js");
let config = {
numThings: 4, // size of circular buffer
numWorkers: 4, // number of workers
numMessages: 500, // number of messages sent to each worker
allocInterval: 11, // interval for allocating new things per worker
traceScript: false, // print the script
traceAlloc: true, // print each allocation attempt
traceIteration: 10, // print diagnostics every so many iterations
abortOnFail: true, // kill worker if allocation fails
AllocThing: function AllocThing(id) {
let pages = 1, max = 1;
return new WebAssembly.Memory({initial : pages, maximum : max, shared : true});
},
BeforeSend: function BeforeSend(msg) {
gc();
},
BeforeReceive: function BeforeReceive(msg) {
gc();
}
}
RunWorkerPingTest(config);