GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/src/api/async_resource.cc at master · basti1302/node Expand file tree/ Copy pathasync_resource.ccMore file actions 72 lines (60 loc) · 2.37 KB / Copy pathasync_resource.ccFile metadata and controls72 lines (60 loc) · 2.37 KB 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 #include "node.h" #include "env-inl.h" namespace node { using v8::Function; using v8::Isolate; using v8::Local; using v8::MaybeLocal; using v8::Object; using v8::String; using v8::Value; AsyncResource::AsyncResource(Isolate* isolate, Local<Object> resource, const char* name, async_id trigger_async_id) : env_(Environment::GetCurrent(isolate)), resource_(isolate, resource) { CHECK_NOT_NULL(env_); async_context_ = EmitAsyncInit(isolate, resource, name, trigger_async_id); } AsyncResource::~AsyncResource() { EmitAsyncDestroy(env_, async_context_); } MaybeLocal<Value> AsyncResource::MakeCallback(Local<Function> callback, int argc, Local<Value>* argv) { return node::MakeCallback(env_->isolate(), get_resource(), callback, argc, argv, async_context_); } MaybeLocal<Value> AsyncResource::MakeCallback(const char* method, int argc, Local<Value>* argv) { return node::MakeCallback(env_->isolate(), get_resource(), method, argc, argv, async_context_); } MaybeLocal<Value> AsyncResource::MakeCallback(Local<String> symbol, int argc, Local<Value>* argv) { return node::MakeCallback(env_->isolate(), get_resource(), symbol, argc, argv, async_context_); } Local<Object> AsyncResource::get_resource() { return resource_.Get(env_->isolate()); } async_id AsyncResource::get_async_id() const { return async_context_.async_id; } async_id AsyncResource::get_trigger_async_id() const { return async_context_.trigger_async_id; } // TODO(addaleax): We shouldn’t need to use env_->isolate() if we’re just going // to end up using the Isolate* to figure out the Environment* again. AsyncResource::CallbackScope::CallbackScope(AsyncResource* res) : node::CallbackScope(res->env_->isolate(), res->resource_.Get(res->env_->isolate()), res->async_context_) {} } // namespace node |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |