/src/node/src/quic/quic.cc
Line | Count | Source (jump to first uncovered line) |
1 | | #if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC |
2 | | |
3 | | #include <base_object-inl.h> |
4 | | #include <env-inl.h> |
5 | | #include <memory_tracker-inl.h> |
6 | | #include <node_realm-inl.h> |
7 | | #include <node_sockaddr-inl.h> |
8 | | #include <v8.h> |
9 | | #include "bindingdata.h" |
10 | | #include "endpoint.h" |
11 | | #include "node_external_reference.h" |
12 | | |
13 | | namespace node { |
14 | | |
15 | | using v8::Context; |
16 | | using v8::Local; |
17 | | using v8::Object; |
18 | | using v8::ObjectTemplate; |
19 | | using v8::Value; |
20 | | |
21 | | namespace quic { |
22 | | |
23 | | int DebugIndentScope::indent_ = 0; |
24 | | |
25 | | void CreatePerIsolateProperties(IsolateData* isolate_data, |
26 | 127k | Local<ObjectTemplate> target) { |
27 | 127k | Endpoint::InitPerIsolate(isolate_data, target); |
28 | 127k | Session::InitPerIsolate(isolate_data, target); |
29 | 127k | } |
30 | | |
31 | | void CreatePerContextProperties(Local<Object> target, |
32 | | Local<Value> unused, |
33 | | Local<Context> context, |
34 | 0 | void* priv) { |
35 | 0 | Realm* realm = Realm::GetCurrent(context); |
36 | 0 | BindingData::InitPerContext(realm, target); |
37 | 0 | Endpoint::InitPerContext(realm, target); |
38 | 0 | Session::InitPerContext(realm, target); |
39 | 0 | } |
40 | | |
41 | 0 | void RegisterExternalReferences(ExternalReferenceRegistry* registry) { |
42 | 0 | BindingData::RegisterExternalReferences(registry); |
43 | 0 | Endpoint::RegisterExternalReferences(registry); |
44 | 0 | Session::RegisterExternalReferences(registry); |
45 | 0 | } |
46 | | |
47 | | } // namespace quic |
48 | | } // namespace node |
49 | | |
50 | | NODE_BINDING_CONTEXT_AWARE_INTERNAL(quic, |
51 | | node::quic::CreatePerContextProperties) |
52 | | NODE_BINDING_PER_ISOLATE_INIT(quic, node::quic::CreatePerIsolateProperties) |
53 | | NODE_BINDING_EXTERNAL_REFERENCE(quic, node::quic::RegisterExternalReferences) |
54 | | |
55 | | #endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC |