From 01dc3a85d9f9d5999c5297202cd9eddd0c1a347f Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Tue, 20 Oct 2015 00:52:38 -0700 Subject: [PATCH] Add comment about usage of preventExtensions --- lib/lists.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/lists.js b/lib/lists.js index b11d4b1f..164df2c8 100644 --- a/lib/lists.js +++ b/lib/lists.js @@ -21,6 +21,7 @@ function create(realmId, info) { let meta = util.createList(List.prototype, realmId, info, true); let list = Object.create(meta); + // This will make attempts at assigning to out-of-bounds indices throw an exception. Object.preventExtensions(list); return list;