GCC Code Coverage Report
Directory: ../src/ Exec Total Coverage
File: /home/node-core-coverage/node-core-coverage/workdir/node/out/../src/async-wrap-inl.h Lines: 9 9 100.0 %
Date: 2017-01-02 Branches: 2 4 50.0 %

Line Branch Exec Source
1
#ifndef SRC_ASYNC_WRAP_INL_H_
2
#define SRC_ASYNC_WRAP_INL_H_
3
4
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
5
6
#include "async-wrap.h"
7
#include "base-object.h"
8
#include "base-object-inl.h"
9
#include "env.h"
10
#include "env-inl.h"
11
#include "node_internals.h"
12
#include "util.h"
13
#include "util-inl.h"
14
#include "v8.h"
15
16
namespace node {
17
18
inline bool AsyncWrap::ran_init_callback() const {
19
259479
  return static_cast<bool>(bits_ & 1);
20
}
21
22
23
inline AsyncWrap::ProviderType AsyncWrap::provider_type() const {
24
  return static_cast<ProviderType>(bits_ >> 1);
25
}
26
27
28
inline int64_t AsyncWrap::get_uid() const {
29
  return uid_;
30
}
31
32
33
65769
inline v8::Local<v8::Value> AsyncWrap::MakeCallback(
34
    const v8::Local<v8::String> symbol,
35
    int argc,
36
    v8::Local<v8::Value>* argv) {
37
131538
  v8::Local<v8::Value> cb_v = object()->Get(symbol);
38
65769
  CHECK(cb_v->IsFunction());
39
65769
  return MakeCallback(cb_v.As<v8::Function>(), argc, argv);
40
}
41
42
43
4030
inline v8::Local<v8::Value> AsyncWrap::MakeCallback(
44
    uint32_t index,
45
    int argc,
46
    v8::Local<v8::Value>* argv) {
47
8060
  v8::Local<v8::Value> cb_v = object()->Get(index);
48
4030
  CHECK(cb_v->IsFunction());
49
4030
  return MakeCallback(cb_v.As<v8::Function>(), argc, argv);
50
}
51
52
}  // namespace node
53
54
#endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55
56
#endif  // SRC_ASYNC_WRAP_INL_H_