refactor: load electron builtin modules with process._linkedBinding (#17247)

* refactor: load electron builtin modules with process._linkedBinding

NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are
removed in https://github.com/nodejs/node/pull/25829. This changes
uses the alternative available without any functionality change.

* chore: roll node
This commit is contained in:
Robo 2019-03-08 23:59:52 +05:30 committed by Jeremy Apthorp
parent e5e6aa207c
commit 5afb7dc715
52 changed files with 58 additions and 52 deletions

View file

@ -53,6 +53,12 @@
#include "node_options.h"
#include "node_platform.h"
// Alternative to NODE_MODULE_CONTEXT_AWARE_X.
// Allows to explicitly register builtin modules instead of using
// __attribute__((constructor)).
#define NODE_LINKED_MODULE_CONTEXT_AWARE(modname, regfunc) \
NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_LINKED)
#pragma pop_macro("ASSERT")
#pragma pop_macro("CHECK")
#pragma pop_macro("CHECK_EQ")