GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: node_external_reference.cc Lines: 9 9 100.0 %
Date: 2022-08-29 04:21:03 Branches: 2 2 100.0 %

Line Branch Exec Source
1
#include "node_external_reference.h"
2
#include <cinttypes>
3
#include <vector>
4
#include "base_object-inl.h"
5
#include "util.h"
6
7
namespace node {
8
9
6147
const std::vector<intptr_t>& ExternalReferenceRegistry::external_references() {
10
6147
  if (!is_finalized_) {
11
5415
    external_references_.push_back(reinterpret_cast<intptr_t>(nullptr));
12
5415
    is_finalized_ = true;
13
  }
14
15
6147
  return external_references_;
16
}
17
18
5415
ExternalReferenceRegistry::ExternalReferenceRegistry() {
19
5415
  this->Register(BaseObject::LazilyInitializedJSTemplateConstructor);
20
21
#define V(modname) _register_external_reference_##modname(this);
22
5415
  EXTERNAL_REFERENCE_BINDING_LIST(V)
23
#undef V
24
  // TODO(joyeecheung): collect more external references here.
25
5415
}
26
27
}  // namespace node