summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <saghul@gmail.com>2014-03-13 00:08:29 +0100
committerFedor Indutny <fedor@indutny.com>2014-04-07 16:37:20 +0400
commit42b93437102e63ded3e09bbeb24dc96d5b1b62f6 (patch)
tree07b065cd4f65696bae6fecd5606acffd44ad63c1 /src
parent962f96d3416ee00c78e729bc1c1b05e02d0c1ef2 (diff)
downloadnode-new-42b93437102e63ded3e09bbeb24dc96d5b1b62f6.tar.gz
src: update uv callbacks after API changes
async, timer, prepare, idle and check handles no longer get a status parameter since they can never fail.
Diffstat (limited to 'src')
-rw-r--r--src/cares_wrap.cc2
-rw-r--r--src/node.cc10
-rw-r--r--src/node_watchdog.cc4
-rw-r--r--src/node_watchdog.h4
-rw-r--r--src/node_win32_etw_provider.cc2
-rw-r--r--src/spawn_sync.cc7
-rw-r--r--src/spawn_sync.h4
-rw-r--r--src/timer_wrap.cc5
8 files changed, 18 insertions, 20 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index 1b998694a9..a7bfeda0fd 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -80,7 +80,7 @@ RB_GENERATE_STATIC(ares_task_list, ares_task_t, node, cmp_ares_tasks)
/* This is called once per second by loop->timer. It is used to constantly */
/* call back into c-ares for possibly processing timeouts. */
-static void ares_timeout(uv_timer_t* handle, int status) {
+static void ares_timeout(uv_timer_t* handle) {
Environment* env = Environment::from_cares_timer_handle(handle);
assert(!RB_EMPTY(env->cares_task_list()));
ares_process_fd(env->cares_channel(), ARES_SOCKET_BAD, ARES_SOCKET_BAD);
diff --git a/src/node.cc b/src/node.cc
index 31c77c0b3b..da7c2bcf11 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -185,7 +185,7 @@ void ArrayBufferAllocator::Free(void* data, size_t length) {
}
-static void CheckImmediate(uv_check_t* handle, int status) {
+static void CheckImmediate(uv_check_t* handle) {
Environment* env = Environment::from_immediate_check_handle(handle);
HandleScope scope(env->isolate());
Context::Scope context_scope(env->context());
@@ -193,7 +193,7 @@ static void CheckImmediate(uv_check_t* handle, int status) {
}
-static void IdleImmediateDummy(uv_idle_t*, int) {
+static void IdleImmediateDummy(uv_idle_t* handle) {
// Do nothing. Only for maintaining event loop.
// TODO(bnoordhuis) Maybe make libuv accept NULL idle callbacks.
}
@@ -2520,13 +2520,13 @@ static void NeedImmediateCallbackSetter(
}
-void SetIdle(uv_prepare_t* handle, int) {
+void SetIdle(uv_prepare_t* handle) {
Environment* env = Environment::from_idle_prepare_handle(handle);
env->isolate()->GetCpuProfiler()->SetIdle(true);
}
-void ClearIdle(uv_check_t* handle, int) {
+void ClearIdle(uv_check_t* handle) {
Environment* env = Environment::from_idle_check_handle(handle);
env->isolate()->GetCpuProfiler()->SetIdle(false);
}
@@ -3103,7 +3103,7 @@ static void EnableDebug(Isolate* isolate, bool wait_connect) {
// Called from the main thread.
-static void DispatchDebugMessagesAsyncCallback(uv_async_t* handle, int status) {
+static void DispatchDebugMessagesAsyncCallback(uv_async_t* handle) {
if (debugger_running == false) {
fprintf(stderr, "Starting debugger agent.\n");
EnableDebug(node_isolate, false);
diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc
index dd62dd7432..afa2a7b511 100644
--- a/src/node_watchdog.cc
+++ b/src/node_watchdog.cc
@@ -93,11 +93,11 @@ void Watchdog::Run(void* arg) {
}
-void Watchdog::Async(uv_async_t* async, int status) {
+void Watchdog::Async(uv_async_t* async) {
}
-void Watchdog::Timer(uv_timer_t* timer, int status) {
+void Watchdog::Timer(uv_timer_t* timer) {
V8::TerminateExecution();
}
diff --git a/src/node_watchdog.h b/src/node_watchdog.h
index 87adf197de..e1105d1204 100644
--- a/src/node_watchdog.h
+++ b/src/node_watchdog.h
@@ -38,8 +38,8 @@ class Watchdog {
void Destroy();
static void Run(void* arg);
- static void Async(uv_async_t* async, int status);
- static void Timer(uv_timer_t* timer, int status);
+ static void Async(uv_async_t* async);
+ static void Timer(uv_timer_t* timer);
uv_thread_t thread_;
uv_loop_t* loop_;
diff --git a/src/node_win32_etw_provider.cc b/src/node_win32_etw_provider.cc
index 23aa72205b..94e70da4a5 100644
--- a/src/node_win32_etw_provider.cc
+++ b/src/node_win32_etw_provider.cc
@@ -124,7 +124,7 @@ void CodeAddressNotification(const JitCodeEvent* jevent) {
// Note: It is possible to call v8 from ETW thread, but then
// event callbacks are received in the same thread. Attempts
// to write ETW events in this thread will fail.
-void etw_events_change_async(uv_async_t* handle, int status) {
+void etw_events_change_async(uv_async_t* handle) {
if (events_enabled > 0) {
NODE_V8SYMBOL_RESET();
V8::SetJitCodeEventHandler(v8::kJitCodeEventEnumExisting,
diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc
index 73d821ae75..481d0eff09 100644
--- a/src/spawn_sync.cc
+++ b/src/spawn_sync.cc
@@ -617,8 +617,7 @@ void SyncProcessRunner::OnExit(int64_t exit_status, int term_signal) {
}
-void SyncProcessRunner::OnKillTimerTimeout(int status) {
- assert(status == 0);
+void SyncProcessRunner::OnKillTimerTimeout() {
SetError(UV_ETIMEDOUT);
Kill();
}
@@ -1037,9 +1036,9 @@ void SyncProcessRunner::ExitCallback(uv_process_t* handle,
}
-void SyncProcessRunner::KillTimerCallback(uv_timer_t* handle, int status) {
+void SyncProcessRunner::KillTimerCallback(uv_timer_t* handle) {
SyncProcessRunner* self = reinterpret_cast<SyncProcessRunner*>(handle->data);
- self->OnKillTimerTimeout(status);
+ self->OnKillTimerTimeout();
}
diff --git a/src/spawn_sync.h b/src/spawn_sync.h
index 5a9c4dfc84..615e1b9b88 100644
--- a/src/spawn_sync.h
+++ b/src/spawn_sync.h
@@ -174,7 +174,7 @@ class SyncProcessRunner {
void IncrementBufferSizeAndCheckOverflow(ssize_t length);
void OnExit(int64_t exit_status, int term_signal);
- void OnKillTimerTimeout(int status);
+ void OnKillTimerTimeout();
int GetError();
void SetError(int error);
@@ -202,7 +202,7 @@ class SyncProcessRunner {
static void ExitCallback(uv_process_t* handle,
int64_t exit_status,
int term_signal);
- static void KillTimerCallback(uv_timer_t* handle, int status);
+ static void KillTimerCallback(uv_timer_t* handle);
static void KillTimerCloseCallback(uv_handle_t* handle);
size_t max_buffer_;
diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc
index 9f0b1fdf05..099a54ec95 100644
--- a/src/timer_wrap.cc
+++ b/src/timer_wrap.cc
@@ -144,13 +144,12 @@ class TimerWrap : public HandleWrap {
args.GetReturnValue().Set(static_cast<double>(repeat));
}
- static void OnTimeout(uv_timer_t* handle, int status) {
+ static void OnTimeout(uv_timer_t* handle) {
TimerWrap* wrap = static_cast<TimerWrap*>(handle->data);
Environment* env = wrap->env();
HandleScope handle_scope(env->isolate());
Context::Scope context_scope(env->context());
- Local<Value> argv[1] = { Integer::New(env->isolate(), status) };
- wrap->MakeCallback(kOnTimeout, ARRAY_SIZE(argv), argv);
+ wrap->MakeCallback(kOnTimeout, 0, NULL);
}
static void Now(const FunctionCallbackInfo<Value>& args) {