1 |
|
|
#include "node_external_reference.h" |
2 |
|
|
#include <cinttypes> |
3 |
|
|
#include <vector> |
4 |
|
|
#include "util.h" |
5 |
|
|
|
6 |
|
|
namespace node { |
7 |
|
|
|
8 |
|
4621 |
const std::vector<intptr_t>& ExternalReferenceRegistry::external_references() { |
9 |
✗✓ |
4621 |
CHECK(!is_finalized_); |
10 |
|
4621 |
external_references_.push_back(reinterpret_cast<intptr_t>(nullptr)); |
11 |
|
4621 |
is_finalized_ = true; |
12 |
|
4621 |
return external_references_; |
13 |
|
|
} |
14 |
|
|
|
15 |
|
4621 |
ExternalReferenceRegistry::ExternalReferenceRegistry() { |
16 |
|
|
#define V(modname) _register_external_reference_##modname(this); |
17 |
|
4621 |
EXTERNAL_REFERENCE_BINDING_LIST(V) |
18 |
|
|
#undef V |
19 |
|
4621 |
// TODO(joyeecheung): collect more external references here. |
20 |
|
9242 |
} |
21 |
|
4621 |
|
22 |
|
4621 |
} // namespace node |