Use null-prototype objects for maps

A {} has a bunch of names already defined on it (like ‘toString’).  When using an object as a map with arbitrary keys, it should not inherit from Object.prototype.
This commit is contained in:
Neil Fraser
2021-06-08 06:03:14 -07:00
committed by Neil Fraser
parent 53d8754ee9
commit 76b5517008
20 changed files with 46 additions and 60 deletions

View File

@@ -398,7 +398,7 @@ return gulp.src(maybeAddClosureLibrary(['core/**/**/*.js']))
const requires = `goog.addDependency("base.js", [], []);
// Load Blockly.
goog.require('Blockly.requires')
goog.require('Blockly.requires');
`;
fs.writeFileSync('blockly_uncompressed.js',
header +