mirror of
https://github.com/servo/servo.git
synced 2025-07-19 21:33:49 +01:00
19 lines
571 B
JavaScript
19 lines
571 B
JavaScript
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// This test makes sure browsers behave reasonably when asked to allocate a
|
|
// large number of WebAssembly.Memory objects at once.
|
|
test(function() {
|
|
let memories = [];
|
|
try {
|
|
for (let i = 0; i < 600; i++) {
|
|
memories.push(new WebAssembly.Memory({initial: 1}));
|
|
}
|
|
} catch (e) {
|
|
if (e instanceof RangeError) {
|
|
return;
|
|
}
|
|
throw e;
|
|
}
|
|
}, "WebAssembly#CreateManyMemories");
|