GCC Code Coverage Report
Directory: ../ Exec Total Coverage
File: /home/iojs/build/workspace/node-test-commit-linux-coverage-daily/nodes/benchmark/out/../src/node_serdes.cc Lines: 201 249 80.7 %
Date: 2021-04-30 04:12:06 Branches: 52 108 48.1 %

Line Branch Exec Source
1
#include "base_object-inl.h"
2
#include "node_buffer.h"
3
#include "node_errors.h"
4
#include "node_external_reference.h"
5
#include "node_internals.h"
6
#include "util-inl.h"
7
8
namespace node {
9
10
using v8::Array;
11
using v8::ArrayBuffer;
12
using v8::Context;
13
using v8::Function;
14
using v8::FunctionCallbackInfo;
15
using v8::FunctionTemplate;
16
using v8::Integer;
17
using v8::Isolate;
18
using v8::Just;
19
using v8::Local;
20
using v8::Maybe;
21
using v8::MaybeLocal;
22
using v8::Nothing;
23
using v8::Object;
24
using v8::SharedArrayBuffer;
25
using v8::String;
26
using v8::Value;
27
using v8::ValueDeserializer;
28
using v8::ValueSerializer;
29
30
namespace serdes {
31
32
class SerializerContext : public BaseObject,
33
                          public ValueSerializer::Delegate {
34
 public:
35
  SerializerContext(Environment* env,
36
                    Local<Object> wrap);
37
38
598
  ~SerializerContext() override = default;
39
40
  void ThrowDataCloneError(Local<String> message) override;
41
  Maybe<bool> WriteHostObject(Isolate* isolate, Local<Object> object) override;
42
  Maybe<uint32_t> GetSharedArrayBufferId(
43
      Isolate* isolate, Local<SharedArrayBuffer> shared_array_buffer) override;
44
45
  static void SetTreatArrayBufferViewsAsHostObjects(
46
      const FunctionCallbackInfo<Value>& args);
47
48
  static void New(const FunctionCallbackInfo<Value>& args);
49
  static void WriteHeader(const FunctionCallbackInfo<Value>& args);
50
  static void WriteValue(const FunctionCallbackInfo<Value>& args);
51
  static void ReleaseBuffer(const FunctionCallbackInfo<Value>& args);
52
  static void TransferArrayBuffer(const FunctionCallbackInfo<Value>& args);
53
  static void WriteUint32(const FunctionCallbackInfo<Value>& args);
54
  static void WriteUint64(const FunctionCallbackInfo<Value>& args);
55
  static void WriteDouble(const FunctionCallbackInfo<Value>& args);
56
  static void WriteRawBytes(const FunctionCallbackInfo<Value>& args);
57
58
  SET_NO_MEMORY_INFO()
59
  SET_MEMORY_INFO_NAME(SerializerContext)
60
  SET_SELF_SIZE(SerializerContext)
61
62
 private:
63
  ValueSerializer serializer_;
64
};
65
66
class DeserializerContext : public BaseObject,
67
                            public ValueDeserializer::Delegate {
68
 public:
69
  DeserializerContext(Environment* env,
70
                      Local<Object> wrap,
71
                      Local<Value> buffer);
72
73
658
  ~DeserializerContext() override = default;
74
75
  MaybeLocal<Object> ReadHostObject(Isolate* isolate) override;
76
77
  static void New(const FunctionCallbackInfo<Value>& args);
78
  static void ReadHeader(const FunctionCallbackInfo<Value>& args);
79
  static void ReadValue(const FunctionCallbackInfo<Value>& args);
80
  static void TransferArrayBuffer(const FunctionCallbackInfo<Value>& args);
81
  static void GetWireFormatVersion(const FunctionCallbackInfo<Value>& args);
82
  static void ReadUint32(const FunctionCallbackInfo<Value>& args);
83
  static void ReadUint64(const FunctionCallbackInfo<Value>& args);
84
  static void ReadDouble(const FunctionCallbackInfo<Value>& args);
85
  static void ReadRawBytes(const FunctionCallbackInfo<Value>& args);
86
87
  SET_NO_MEMORY_INFO()
88
  SET_MEMORY_INFO_NAME(DeserializerContext)
89
  SET_SELF_SIZE(DeserializerContext)
90
91
 private:
92
  const uint8_t* data_;
93
  const size_t length_;
94
95
  ValueDeserializer deserializer_;
96
};
97
98
299
SerializerContext::SerializerContext(Environment* env, Local<Object> wrap)
99
  : BaseObject(env, wrap),
100
299
    serializer_(env->isolate(), this) {
101
299
  MakeWeak();
102
299
}
103
104
2
void SerializerContext::ThrowDataCloneError(Local<String> message) {
105
4
  Local<Value> args[1] = { message };
106
  Local<Value> get_data_clone_error =
107
6
      object()->Get(env()->context(),
108
8
                    env()->get_data_clone_error_string())
109
2
                      .ToLocalChecked();
110
111
2
  CHECK(get_data_clone_error->IsFunction());
112
  MaybeLocal<Value> error =
113
4
      get_data_clone_error.As<Function>()->Call(env()->context(),
114
                                                object(),
115
2
                                                arraysize(args),
116
8
                                                args);
117
118
2
  if (error.IsEmpty()) return;
119
120
2
  env()->isolate()->ThrowException(error.ToLocalChecked());
121
}
122
123
Maybe<uint32_t> SerializerContext::GetSharedArrayBufferId(
124
    Isolate* isolate, Local<SharedArrayBuffer> shared_array_buffer) {
125
  Local<Value> args[1] = { shared_array_buffer };
126
  Local<Value> get_shared_array_buffer_id =
127
      object()->Get(env()->context(),
128
                    env()->get_shared_array_buffer_id_string())
129
                      .ToLocalChecked();
130
131
  if (!get_shared_array_buffer_id->IsFunction()) {
132
    return ValueSerializer::Delegate::GetSharedArrayBufferId(
133
        isolate, shared_array_buffer);
134
  }
135
136
  MaybeLocal<Value> id =
137
      get_shared_array_buffer_id.As<Function>()->Call(env()->context(),
138
                                                      object(),
139
                                                      arraysize(args),
140
                                                      args);
141
142
  if (id.IsEmpty()) return Nothing<uint32_t>();
143
144
  return id.ToLocalChecked()->Uint32Value(env()->context());
145
}
146
147
42
Maybe<bool> SerializerContext::WriteHostObject(Isolate* isolate,
148
                                               Local<Object> input) {
149
  MaybeLocal<Value> ret;
150
84
  Local<Value> args[1] = { input };
151
152
  Local<Value> write_host_object =
153
126
      object()->Get(env()->context(),
154
210
                    env()->write_host_object_string()).ToLocalChecked();
155
156
42
  if (!write_host_object->IsFunction()) {
157
    return ValueSerializer::Delegate::WriteHostObject(isolate, input);
158
  }
159
160
84
  ret = write_host_object.As<Function>()->Call(env()->context(),
161
                                               object(),
162
42
                                               arraysize(args),
163
168
                                               args);
164
165
42
  if (ret.IsEmpty())
166
2
    return Nothing<bool>();
167
168
40
  return Just(true);
169
}
170
171
300
void SerializerContext::New(const FunctionCallbackInfo<Value>& args) {
172
300
  Environment* env = Environment::GetCurrent(args);
173
300
  if (!args.IsConstructCall()) {
174
    return THROW_ERR_CONSTRUCT_CALL_REQUIRED(
175
1
        env, "Class constructor Serializer cannot be invoked without 'new'");
176
  }
177
178
299
  new SerializerContext(env, args.This());
179
}
180
181
298
void SerializerContext::WriteHeader(const FunctionCallbackInfo<Value>& args) {
182
  SerializerContext* ctx;
183
298
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
184
298
  ctx->serializer_.WriteHeader();
185
}
186
187
306
void SerializerContext::WriteValue(const FunctionCallbackInfo<Value>& args) {
188
  SerializerContext* ctx;
189
306
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
190
  Maybe<bool> ret =
191
306
      ctx->serializer_.WriteValue(ctx->env()->context(), args[0]);
192
193
1212
  if (ret.IsJust()) args.GetReturnValue().Set(ret.FromJust());
194
}
195
196
297
void SerializerContext::SetTreatArrayBufferViewsAsHostObjects(
197
    const FunctionCallbackInfo<Value>& args) {
198
  SerializerContext* ctx;
199
297
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
200
201
891
  bool value = args[0]->BooleanValue(ctx->env()->isolate());
202
297
  ctx->serializer_.SetTreatArrayBufferViewsAsHostObjects(value);
203
}
204
205
294
void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) {
206
  SerializerContext* ctx;
207
294
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
208
209
  // Note: Both ValueSerializer and this Buffer::New() variant use malloc()
210
  // as the underlying allocator.
211
294
  std::pair<uint8_t*, size_t> ret = ctx->serializer_.Release();
212
  auto buf = Buffer::New(ctx->env(),
213
294
                         reinterpret_cast<char*>(ret.first),
214
588
                         ret.second);
215
216
294
  if (!buf.IsEmpty()) {
217
588
    args.GetReturnValue().Set(buf.ToLocalChecked());
218
  }
219
}
220
221
void SerializerContext::TransferArrayBuffer(
222
    const FunctionCallbackInfo<Value>& args) {
223
  SerializerContext* ctx;
224
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
225
226
  Maybe<uint32_t> id = args[0]->Uint32Value(ctx->env()->context());
227
  if (id.IsNothing()) return;
228
229
  if (!args[1]->IsArrayBuffer())
230
    return node::THROW_ERR_INVALID_ARG_TYPE(
231
        ctx->env(), "arrayBuffer must be an ArrayBuffer");
232
233
  Local<ArrayBuffer> ab = args[1].As<ArrayBuffer>();
234
  ctx->serializer_.TransferArrayBuffer(id.FromJust(), ab);
235
  return;
236
}
237
238
81
void SerializerContext::WriteUint32(const FunctionCallbackInfo<Value>& args) {
239
  SerializerContext* ctx;
240
81
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
241
242
243
  Maybe<uint32_t> value = args[0]->Uint32Value(ctx->env()->context());
243
81
  if (value.IsNothing()) return;
244
245
81
  ctx->serializer_.WriteUint32(value.FromJust());
246
}
247
248
1
void SerializerContext::WriteUint64(const FunctionCallbackInfo<Value>& args) {
249
  SerializerContext* ctx;
250
1
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
251
252
3
  Maybe<uint32_t> arg0 = args[0]->Uint32Value(ctx->env()->context());
253
3
  Maybe<uint32_t> arg1 = args[1]->Uint32Value(ctx->env()->context());
254

2
  if (arg0.IsNothing() || arg1.IsNothing())
255
    return;
256
257
1
  uint64_t hi = arg0.FromJust();
258
1
  uint64_t lo = arg1.FromJust();
259
1
  ctx->serializer_.WriteUint64((hi << 32) | lo);
260
}
261
262
1
void SerializerContext::WriteDouble(const FunctionCallbackInfo<Value>& args) {
263
  SerializerContext* ctx;
264
1
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
265
266
3
  Maybe<double> value = args[0]->NumberValue(ctx->env()->context());
267
1
  if (value.IsNothing()) return;
268
269
1
  ctx->serializer_.WriteDouble(value.FromJust());
270
}
271
272
41
void SerializerContext::WriteRawBytes(const FunctionCallbackInfo<Value>& args) {
273
  SerializerContext* ctx;
274
42
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
275
276
82
  if (!args[0]->IsArrayBufferView()) {
277
1
    return node::THROW_ERR_INVALID_ARG_TYPE(
278
1
        ctx->env(), "source must be a TypedArray or a DataView");
279
  }
280
281
40
  ArrayBufferViewContents<char> bytes(args[0]);
282
40
  ctx->serializer_.WriteRawBytes(bytes.data(), bytes.length());
283
}
284
285
329
DeserializerContext::DeserializerContext(Environment* env,
286
                                         Local<Object> wrap,
287
329
                                         Local<Value> buffer)
288
  : BaseObject(env, wrap),
289
329
    data_(reinterpret_cast<const uint8_t*>(Buffer::Data(buffer))),
290
329
    length_(Buffer::Length(buffer)),
291
987
    deserializer_(env->isolate(), data_, length_, this) {
292
1316
  object()->Set(env->context(), env->buffer_string(), buffer).Check();
293
294
329
  MakeWeak();
295
329
}
296
297
53
MaybeLocal<Object> DeserializerContext::ReadHostObject(Isolate* isolate) {
298
  Local<Value> read_host_object =
299
159
      object()->Get(env()->context(),
300
265
                    env()->read_host_object_string()).ToLocalChecked();
301
302
53
  if (!read_host_object->IsFunction()) {
303
    return ValueDeserializer::Delegate::ReadHostObject(isolate);
304
  }
305
306
106
  Isolate::AllowJavascriptExecutionScope allow_js(isolate);
307
  MaybeLocal<Value> ret =
308
106
      read_host_object.As<Function>()->Call(env()->context(),
309
                                            object(),
310
                                            0,
311
212
                                            nullptr);
312
313
53
  if (ret.IsEmpty())
314
    return MaybeLocal<Object>();
315
316
53
  Local<Value> return_value = ret.ToLocalChecked();
317
53
  if (!return_value->IsObject()) {
318
    env()->ThrowTypeError("readHostObject must return an object");
319
    return MaybeLocal<Object>();
320
  }
321
322
53
  return return_value.As<Object>();
323
}
324
325
332
void DeserializerContext::New(const FunctionCallbackInfo<Value>& args) {
326
332
  Environment* env = Environment::GetCurrent(args);
327
332
  if (!args.IsConstructCall()) {
328
    return THROW_ERR_CONSTRUCT_CALL_REQUIRED(
329
1
        env, "Class constructor Deserializer cannot be invoked without 'new'");
330
  }
331
332
662
  if (!args[0]->IsArrayBufferView()) {
333
    return node::THROW_ERR_INVALID_ARG_TYPE(
334
2
        env, "buffer must be a TypedArray or a DataView");
335
  }
336
337
658
  new DeserializerContext(env, args.This(), args[0]);
338
}
339
340
328
void DeserializerContext::ReadHeader(const FunctionCallbackInfo<Value>& args) {
341
  DeserializerContext* ctx;
342
328
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
343
344
328
  Maybe<bool> ret = ctx->deserializer_.ReadHeader(ctx->env()->context());
345
346
1312
  if (ret.IsJust()) args.GetReturnValue().Set(ret.FromJust());
347
}
348
349
337
void DeserializerContext::ReadValue(const FunctionCallbackInfo<Value>& args) {
350
  DeserializerContext* ctx;
351
337
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
352
353
337
  MaybeLocal<Value> ret = ctx->deserializer_.ReadValue(ctx->env()->context());
354
355
1011
  if (!ret.IsEmpty()) args.GetReturnValue().Set(ret.ToLocalChecked());
356
}
357
358
void DeserializerContext::TransferArrayBuffer(
359
    const FunctionCallbackInfo<Value>& args) {
360
  DeserializerContext* ctx;
361
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
362
363
  Maybe<uint32_t> id = args[0]->Uint32Value(ctx->env()->context());
364
  if (id.IsNothing()) return;
365
366
  if (args[1]->IsArrayBuffer()) {
367
    Local<ArrayBuffer> ab = args[1].As<ArrayBuffer>();
368
    ctx->deserializer_.TransferArrayBuffer(id.FromJust(), ab);
369
    return;
370
  }
371
372
  if (args[1]->IsSharedArrayBuffer()) {
373
    Local<SharedArrayBuffer> sab = args[1].As<SharedArrayBuffer>();
374
    ctx->deserializer_.TransferSharedArrayBuffer(id.FromJust(), sab);
375
    return;
376
  }
377
378
  return node::THROW_ERR_INVALID_ARG_TYPE(
379
      ctx->env(), "arrayBuffer must be an ArrayBuffer or SharedArrayBuffer");
380
}
381
382
1
void DeserializerContext::GetWireFormatVersion(
383
    const FunctionCallbackInfo<Value>& args) {
384
  DeserializerContext* ctx;
385
1
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
386
387
3
  args.GetReturnValue().Set(ctx->deserializer_.GetWireFormatVersion());
388
}
389
390
107
void DeserializerContext::ReadUint32(const FunctionCallbackInfo<Value>& args) {
391
  DeserializerContext* ctx;
392
107
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
393
394
  uint32_t value;
395
107
  bool ok = ctx->deserializer_.ReadUint32(&value);
396
107
  if (!ok) return ctx->env()->ThrowError("ReadUint32() failed");
397
321
  return args.GetReturnValue().Set(value);
398
}
399
400
1
void DeserializerContext::ReadUint64(const FunctionCallbackInfo<Value>& args) {
401
  DeserializerContext* ctx;
402
1
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
403
404
  uint64_t value;
405
1
  bool ok = ctx->deserializer_.ReadUint64(&value);
406
1
  if (!ok) return ctx->env()->ThrowError("ReadUint64() failed");
407
408
1
  uint32_t hi = static_cast<uint32_t>(value >> 32);
409
1
  uint32_t lo = static_cast<uint32_t>(value);
410
411
1
  Isolate* isolate = ctx->env()->isolate();
412
413
  Local<Value> ret[] = {
414
    Integer::NewFromUnsigned(isolate, hi),
415
    Integer::NewFromUnsigned(isolate, lo)
416
3
  };
417
3
  return args.GetReturnValue().Set(Array::New(isolate, ret, arraysize(ret)));
418
}
419
420
2
void DeserializerContext::ReadDouble(const FunctionCallbackInfo<Value>& args) {
421
  DeserializerContext* ctx;
422
2
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
423
424
  double value;
425
2
  bool ok = ctx->deserializer_.ReadDouble(&value);
426
2
  if (!ok) return ctx->env()->ThrowError("ReadDouble() failed");
427
3
  return args.GetReturnValue().Set(value);
428
}
429
430
53
void DeserializerContext::ReadRawBytes(
431
    const FunctionCallbackInfo<Value>& args) {
432
  DeserializerContext* ctx;
433
53
  ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
434
435
159
  Maybe<int64_t> length_arg = args[0]->IntegerValue(ctx->env()->context());
436
53
  if (length_arg.IsNothing()) return;
437
53
  size_t length = length_arg.FromJust();
438
439
  const void* data;
440
53
  bool ok = ctx->deserializer_.ReadRawBytes(length, &data);
441
53
  if (!ok) return ctx->env()->ThrowError("ReadRawBytes() failed");
442
443
53
  const uint8_t* position = reinterpret_cast<const uint8_t*>(data);
444
53
  CHECK_GE(position, ctx->data_);
445
53
  CHECK_LE(position + length, ctx->data_ + ctx->length_);
446
447
53
  const uint32_t offset = static_cast<uint32_t>(position - ctx->data_);
448
53
  CHECK_EQ(ctx->data_ + offset, position);
449
450
106
  args.GetReturnValue().Set(offset);
451
}
452
453
461
void Initialize(Local<Object> target,
454
                Local<Value> unused,
455
                Local<Context> context,
456
                void* priv) {
457
461
  Environment* env = Environment::GetCurrent(context);
458
  Local<FunctionTemplate> ser =
459
461
      env->NewFunctionTemplate(SerializerContext::New);
460
461
1383
  ser->InstanceTemplate()->SetInternalFieldCount(
462
461
      SerializerContext::kInternalFieldCount);
463
922
  ser->Inherit(BaseObject::GetConstructorTemplate(env));
464
465
461
  env->SetProtoMethod(ser, "writeHeader", SerializerContext::WriteHeader);
466
461
  env->SetProtoMethod(ser, "writeValue", SerializerContext::WriteValue);
467
461
  env->SetProtoMethod(ser, "releaseBuffer", SerializerContext::ReleaseBuffer);
468
  env->SetProtoMethod(ser,
469
                      "transferArrayBuffer",
470
461
                      SerializerContext::TransferArrayBuffer);
471
461
  env->SetProtoMethod(ser, "writeUint32", SerializerContext::WriteUint32);
472
461
  env->SetProtoMethod(ser, "writeUint64", SerializerContext::WriteUint64);
473
461
  env->SetProtoMethod(ser, "writeDouble", SerializerContext::WriteDouble);
474
461
  env->SetProtoMethod(ser, "writeRawBytes", SerializerContext::WriteRawBytes);
475
  env->SetProtoMethod(ser,
476
                      "_setTreatArrayBufferViewsAsHostObjects",
477
461
                      SerializerContext::SetTreatArrayBufferViewsAsHostObjects);
478
479
461
  ser->ReadOnlyPrototype();
480
461
  env->SetConstructorFunction(target, "Serializer", ser);
481
482
  Local<FunctionTemplate> des =
483
461
      env->NewFunctionTemplate(DeserializerContext::New);
484
485
1383
  des->InstanceTemplate()->SetInternalFieldCount(
486
461
      DeserializerContext::kInternalFieldCount);
487
922
  des->Inherit(BaseObject::GetConstructorTemplate(env));
488
489
461
  env->SetProtoMethod(des, "readHeader", DeserializerContext::ReadHeader);
490
461
  env->SetProtoMethod(des, "readValue", DeserializerContext::ReadValue);
491
  env->SetProtoMethod(des,
492
                      "getWireFormatVersion",
493
461
                      DeserializerContext::GetWireFormatVersion);
494
  env->SetProtoMethod(des,
495
                      "transferArrayBuffer",
496
461
                      DeserializerContext::TransferArrayBuffer);
497
461
  env->SetProtoMethod(des, "readUint32", DeserializerContext::ReadUint32);
498
461
  env->SetProtoMethod(des, "readUint64", DeserializerContext::ReadUint64);
499
461
  env->SetProtoMethod(des, "readDouble", DeserializerContext::ReadDouble);
500
461
  env->SetProtoMethod(des, "_readRawBytes", DeserializerContext::ReadRawBytes);
501
502
461
  des->SetLength(1);
503
461
  des->ReadOnlyPrototype();
504
461
  env->SetConstructorFunction(target, "Deserializer", des);
505
461
}
506
507
4762
void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
508
4762
  registry->Register(SerializerContext::New);
509
510
4762
  registry->Register(SerializerContext::WriteHeader);
511
4762
  registry->Register(SerializerContext::WriteValue);
512
4762
  registry->Register(SerializerContext::ReleaseBuffer);
513
4762
  registry->Register(SerializerContext::TransferArrayBuffer);
514
4762
  registry->Register(SerializerContext::WriteUint32);
515
4762
  registry->Register(SerializerContext::WriteUint64);
516
4762
  registry->Register(SerializerContext::WriteDouble);
517
4762
  registry->Register(SerializerContext::WriteRawBytes);
518
4762
  registry->Register(SerializerContext::SetTreatArrayBufferViewsAsHostObjects);
519
520
4762
  registry->Register(DeserializerContext::New);
521
4762
  registry->Register(DeserializerContext::ReadHeader);
522
4762
  registry->Register(DeserializerContext::ReadValue);
523
4762
  registry->Register(DeserializerContext::GetWireFormatVersion);
524
4762
  registry->Register(DeserializerContext::TransferArrayBuffer);
525
4762
  registry->Register(DeserializerContext::ReadUint32);
526
4762
  registry->Register(DeserializerContext::ReadUint64);
527
4762
  registry->Register(DeserializerContext::ReadDouble);
528
4762
  registry->Register(DeserializerContext::ReadRawBytes);
529
4762
}
530
531
}  // namespace serdes
532
}  // namespace node
533
534
4820
NODE_MODULE_CONTEXT_AWARE_INTERNAL(serdes, node::serdes::Initialize)
535

19246
NODE_MODULE_EXTERNAL_REFERENCE(serdes, node::serdes::RegisterExternalReferences)