1'use strict'; 2 3const { internalBinding } = require('internal/test/binding'); 4const { WeakReference } = internalBinding('util'); 5const { 6 setDeserializeMainFunction 7} = require('v8').startupSnapshot 8const assert = require('assert'); 9 10let obj = { hello: 'world' }; 11const ref = new WeakReference(obj); 12 13setDeserializeMainFunction(() => { 14 assert.strictEqual(ref.get(), obj); 15}); 16