blob: d5d675ab7e2066a7540fb3da7b3c7dcb8091c7c7 [file] [log] [blame] [edit]
'use strict';
// Flags: --expose-gc
const common = require('../../common');
const assert = require('assert');
const test_exception = require(`./build/${common.buildType}/test_exception`);
// Make sure that exceptions that occur during finalization are propagated.
function testFinalize(binding) {
let x = test_exception[binding]();
x = null;
assert.throws(() => { global.gc(); }, /Error during Finalize/);
// To assuage the linter's concerns.
(function() {})(x);
}
testFinalize('createExternalBuffer');