11cb0ef41Sopenharmony_ci// Flags: --disable-proto=delete 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci'use strict'; 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_cirequire('../common'); 61cb0ef41Sopenharmony_ciconst assert = require('assert'); 71cb0ef41Sopenharmony_ciconst vm = require('vm'); 81cb0ef41Sopenharmony_ciconst { Worker, isMainThread } = require('worker_threads'); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci// eslint-disable-next-line no-proto 111cb0ef41Sopenharmony_ciassert.strictEqual(Object.prototype.__proto__, undefined); 121cb0ef41Sopenharmony_ciassert(!Object.hasOwn(Object.prototype, '__proto__')); 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ciconst ctx = vm.createContext(); 151cb0ef41Sopenharmony_ciconst ctxGlobal = vm.runInContext('this', ctx); 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ci// eslint-disable-next-line no-proto 181cb0ef41Sopenharmony_ciassert.strictEqual(ctxGlobal.Object.prototype.__proto__, undefined); 191cb0ef41Sopenharmony_ciassert(!Object.hasOwn(ctxGlobal.Object.prototype, '__proto__')); 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ciif (isMainThread) { 221cb0ef41Sopenharmony_ci new Worker(__filename); 231cb0ef41Sopenharmony_ci} else { 241cb0ef41Sopenharmony_ci process.exit(); 251cb0ef41Sopenharmony_ci} 26