From 04865cf6f060c917cce8dbffd38c3f44db1e16f3 Mon Sep 17 00:00:00 2001
From: Guy Bedford <guybedford@gmail.com>
Date: Thu, 3 Sep 2020 15:31:32 -0700
Subject: [PATCH] bootstrap: correct --frozen-intrinsics override fix

PR-URL: https://github.com/nodejs/node/pull/35041
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
---
 lib/internal/freeze_intrinsics.js       | 4 ++--
 test/parallel/test-freeze-intrinsics.js | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js
index 60fff67f2e100c..dc64c13409b2f1 100644
--- a/lib/internal/freeze_intrinsics.js
+++ b/lib/internal/freeze_intrinsics.js
@@ -384,8 +384,8 @@ module.exports = function() {
           defineProperty(this, prop, {
             value: newValue,
             writable: true,
-            enumerable: desc.enumerable,
-            configurable: desc.configurable
+            enumerable: true,
+            configurable: true
           });
         }
       }
diff --git a/test/parallel/test-freeze-intrinsics.js b/test/parallel/test-freeze-intrinsics.js
index 0cae3167f9eaeb..2e9ff5f4fe2fdc 100644
--- a/test/parallel/test-freeze-intrinsics.js
+++ b/test/parallel/test-freeze-intrinsics.js
@@ -27,4 +27,6 @@ assert.throws(
   const o = {};
   o.toString = () => 'Custom toString';
   assert.strictEqual(o + 'asdf', 'Custom toStringasdf');
+  assert.strictEqual(Object.getOwnPropertyDescriptor(o, 'toString').enumerable,
+                     true);
 }