From e4ba665c8784a0eac7af16927750aead76176705 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 29 Jun 2009 20:53:54 +0200 Subject: [PATCH] Fix ref/unref problem. Was doing opposite of what I should. --- src/events.cc | 6 +++--- test/mjsunit/test-http-cat.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/events.cc b/src/events.cc index 555aa2b152..f39d8e796f 100644 --- a/src/events.cc +++ b/src/events.cc @@ -86,7 +86,7 @@ Promise::Create (void) ObjectWrap::InformV8ofAllocation(promise); promise->Attach(); - ev_unref(EV_DEFAULT_UC); + ev_ref(EV_DEFAULT_UC); return promise; } @@ -97,7 +97,7 @@ Promise::EmitSuccess (int argc, v8::Handle argv[]) bool r = Emit("success", argc, argv); Detach(); - ev_ref(EV_DEFAULT_UC); + ev_unref(EV_DEFAULT_UC); return r; } @@ -108,7 +108,7 @@ Promise::EmitError (int argc, v8::Handle argv[]) bool r = Emit("error", argc, argv); Detach(); - ev_ref(EV_DEFAULT_UC); + ev_unref(EV_DEFAULT_UC); return r; } diff --git a/test/mjsunit/test-http-cat.js b/test/mjsunit/test-http-cat.js index 8073f51117..645e59d544 100644 --- a/test/mjsunit/test-http-cat.js +++ b/test/mjsunit/test-http-cat.js @@ -18,15 +18,15 @@ var bad_server_got_error = false; function onLoad () { node.http.cat("http://localhost:"+PORT+"/", "utf8") .addCallback(function (content) { - node.debug("got response"); + puts("got response"); got_good_server_content = true; assertEquals(body, content); server.close(); }); - + node.http.cat("http://localhost:12312/", "utf8") .addErrback(function () { - node.debug("got error (this should happen)"); + puts("got error (this should happen)"); bad_server_got_error = true; }); }