mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
PR-URL: https://github.com/nodejs/node/pull/48528 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
34 lines
770 B
C++
34 lines
770 B
C++
#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_
|