mirror of
https://github.com/nodejs/node.git
synced 2025-05-19 15:40:47 +00:00

`CallbackInfo` is now bound to `ArrayBuffer` instance, not `Uint8Array`, therefore `SPREAD_ARG` will abort with: Assertion failed: ((object)->IsUint8Array()) Make changes necessary to migrate it to `ArrayBuffer`. See: https://github.com/nodejs/node/pull/3080#issuecomment-147502167 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/nodejs/node/pull/3329
24 lines
402 B
JavaScript
24 lines
402 B
JavaScript
'use strict';
|
|
// Flags: --expose-gc
|
|
|
|
require('../../common');
|
|
var assert = require('assert');
|
|
var binding = require('./build/Release/binding');
|
|
|
|
function check(size) {
|
|
var buf = binding.alloc(size);
|
|
var slice = buf.slice(size >>> 1);
|
|
|
|
buf = null;
|
|
binding.check(slice);
|
|
slice = null;
|
|
gc();
|
|
gc();
|
|
gc();
|
|
}
|
|
|
|
check(64);
|
|
|
|
// Empty ArrayBuffer does not allocate data, worth checking
|
|
check(0);
|