Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js')
-rw-r--r--test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js
index 5ad8de9ccf6..0ec46fd6869 100644
--- a/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js
+++ b/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js
@@ -17,9 +17,9 @@ assert(typeof gc === 'function', 'Run this test with --expose-gc');
const kStringMaxLength = process.binding('buffer').kStringMaxLength;
try {
- var buf = new Buffer(kStringMaxLength + 1);
+ var buf = Buffer.allocUnsafe(kStringMaxLength + 1);
// Try to allocate memory first then force gc so future allocations succeed.
- new Buffer(2 * kStringMaxLength);
+ Buffer.allocUnsafe(2 * kStringMaxLength);
gc();
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.