build: allow use of BUILDFLAG directives from within JS code (#20328)

This commit is contained in:
Milan Burda 2020-05-11 01:06:07 +02:00 committed by GitHub
parent f9c04449f4
commit 392ea320cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 132 additions and 74 deletions

View file

@ -354,7 +354,9 @@ const addBuiltinProperty = (name) => {
};
const { commonModuleList } = require('@electron/internal/common/api/module-list');
const browserModules = commonModuleList.concat(require('@electron/internal/browser/api/module-keys'));
const { browserModuleNames } = require('@electron/internal/browser/api/module-names');
const browserModules = commonModuleList.concat(browserModuleNames.map(name => ({ name })));
// And add a helper receiver for each one.
browserModules