aboutsummaryrefslogtreecommitdiff
path: root/src/async-wrap-inl.h
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2014-12-09 16:01:05 +0100
committerBert Belder <bertbelder@gmail.com>2014-12-09 17:57:12 +0100
commit0d60ab3efedd8b2fca607cc5ede7f866be412a0e (patch)
tree202c8698f1bf5c0698a77b8a835b984e45d2f923 /src/async-wrap-inl.h
parent4d946589183ac83f63535c59d04d25df6ed24f47 (diff)
downloadandroid-node-v8-0d60ab3efedd8b2fca607cc5ede7f866be412a0e.tar.gz
android-node-v8-0d60ab3efedd8b2fca607cc5ede7f866be412a0e.tar.bz2
android-node-v8-0d60ab3efedd8b2fca607cc5ede7f866be412a0e.zip
src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being completely removed. Instead low level hooks directly into the mechanism that AL used will be introduced in a future commit. PR-URL: https://github.com/joyent/node/pull/8110 Signed-off-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com> Reviewed-by: Alexis Campailla <alexis@janeasystems.com> Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Diffstat (limited to 'src/async-wrap-inl.h')
-rw-r--r--src/async-wrap-inl.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h
index 750466b3dd..d64aeab2c7 100644
--- a/src/async-wrap-inl.h
+++ b/src/async-wrap-inl.h
@@ -37,20 +37,7 @@ inline AsyncWrap::AsyncWrap(Environment* env,
v8::Handle<v8::Object> object,
ProviderType provider)
: BaseObject(env, object),
- async_flags_(NO_OPTIONS),
provider_type_(provider) {
- if (!env->has_async_listener())
- return;
-
- // TODO(trevnorris): Do we really need to TryCatch this call?
- v8::TryCatch try_catch;
- try_catch.SetVerbose(true);
-
- v8::Local<v8::Value> val = object.As<v8::Value>();
- env->async_listener_run_function()->Call(env->process_object(), 1, &val);
-
- if (!try_catch.HasCaught())
- async_flags_ |= HAS_ASYNC_LISTENER;
}
@@ -59,11 +46,6 @@ inline uint32_t AsyncWrap::provider_type() const {
}
-inline bool AsyncWrap::has_async_listener() {
- return async_flags_ & HAS_ASYNC_LISTENER;
-}
-
-
// I hate you domains.
inline v8::Handle<v8::Value> AsyncWrap::MakeDomainCallback(
const v8::Handle<v8::Function> cb,
@@ -79,14 +61,6 @@ inline v8::Handle<v8::Value> AsyncWrap::MakeDomainCallback(
v8::TryCatch try_catch;
try_catch.SetVerbose(true);
- if (has_async_listener()) {
- v8::Local<v8::Value> val = context.As<v8::Value>();
- env()->async_listener_load_function()->Call(process, 1, &val);
-
- if (try_catch.HasCaught())
- return v8::Undefined(env()->isolate());
- }
-
bool has_domain = domain_v->IsObject();
if (has_domain) {
domain = domain_v.As<v8::Object>();
@@ -119,14 +93,6 @@ inline v8::Handle<v8::Value> AsyncWrap::MakeDomainCallback(
}
}
- if (has_async_listener()) {
- v8::Local<v8::Value> val = context.As<v8::Value>();
- env()->async_listener_unload_function()->Call(process, 1, &val);
-
- if (try_catch.HasCaught())
- return Undefined(env()->isolate());
- }
-
Environment::TickInfo* tick_info = env()->tick_info();
if (tick_info->in_tick()) {
@@ -172,28 +138,12 @@ inline v8::Handle<v8::Value> AsyncWrap::MakeCallback(
v8::TryCatch try_catch;
try_catch.SetVerbose(true);
- if (has_async_listener()) {
- v8::Local<v8::Value> val = context.As<v8::Value>();
- env()->async_listener_load_function()->Call(process, 1, &val);
-
- if (try_catch.HasCaught())
- return v8::Undefined(env()->isolate());
- }
-
v8::Local<v8::Value> ret = cb->Call(context, argc, argv);
if (try_catch.HasCaught()) {
return Undefined(env()->isolate());
}
- if (has_async_listener()) {
- v8::Local<v8::Value> val = context.As<v8::Value>();
- env()->async_listener_unload_function()->Call(process, 1, &val);
-
- if (try_catch.HasCaught())
- return v8::Undefined(env()->isolate());
- }
-
Environment::TickInfo* tick_info = env()->tick_info();
if (tick_info->in_tick()) {