-
-
Notifications
You must be signed in to change notification settings - Fork 35k
Expand file tree
/
Copy pathasync_context_frame.h
More file actions
33 lines (23 loc) · 770 Bytes
/
async_context_frame.h
File metadata and controls
33 lines (23 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef SRC_ASYNC_CONTEXT_FRAME_H_
#define SRC_ASYNC_CONTEXT_FRAME_H_
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include "base_object.h"
#include "v8.h"
#include <cstdint>
namespace node {
namespace async_context_frame {
class Scope {
public:
explicit Scope(v8::Isolate* isolate, v8::Local<v8::Value> object);
~Scope();
private:
v8::Isolate* isolate_;
v8::Global<v8::Value> prior_;
};
v8::Local<v8::Value> current(v8::Isolate* isolate);
void set(v8::Isolate* isolate, v8::Local<v8::Value> value);
v8::Local<v8::Value> exchange(v8::Isolate* isolate, v8::Local<v8::Value> value);
} // namespace async_context_frame
} // namespace node
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#endif // SRC_ASYNC_CONTEXT_FRAME_H_