mirror of
https://github.com/nodejs/node.git
synced 2026-11-15 10:36:53 -05:00
PR-URL: https://github.com/nodejs/node/pull/39961 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com>
26 lines
702 B
C++
26 lines
702 B
C++
#include "node_external_reference.h"
|
|
#include <cinttypes>
|
|
#include <vector>
|
|
#include "base_object-inl.h"
|
|
#include "util.h"
|
|
|
|
namespace node {
|
|
|
|
const std::vector<intptr_t>& ExternalReferenceRegistry::external_references() {
|
|
CHECK(!is_finalized_);
|
|
external_references_.push_back(reinterpret_cast<intptr_t>(nullptr));
|
|
is_finalized_ = true;
|
|
return external_references_;
|
|
}
|
|
|
|
ExternalReferenceRegistry::ExternalReferenceRegistry() {
|
|
this->Register(BaseObject::LazilyInitializedJSTemplateConstructor);
|
|
|
|
#define V(modname) _register_external_reference_##modname(this);
|
|
EXTERNAL_REFERENCE_BINDING_LIST(V)
|
|
#undef V
|
|
// TODO(joyeecheung): collect more external references here.
|
|
}
|
|
|
|
} // namespace node
|