From 4e5247772da5293a109dfff78a9eff89eb5eabdf Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 20 Jan 2012 15:55:38 +0100 Subject: [PATCH] fs, handle_wrap: use Loop(), not uv_default_loop() Using the default loop will fail in unexpected and interesting ways when isolates are used. --- src/handle_wrap.cc | 2 +- src/node_file.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 0eb8281ff9f..86c2a9e6700 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -89,7 +89,7 @@ Handle HandleWrap::Ref(const Arguments& args) { } wrap->unref = false; - uv_ref(uv_default_loop()); + uv_ref(Loop()); return v8::Undefined(); } diff --git a/src/node_file.cc b/src/node_file.cc index 376ebd98c34..abba5765dd2 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -234,7 +234,7 @@ struct fs_req_wrap { uv_fs_t* req = &req_wrap->req_; \ req->result = r; \ req->path = NULL; \ - req->errorno = uv_last_error(uv_default_loop()).code; \ + req->errorno = uv_last_error(Loop()).code; \ After(req); \ } \ return scope.Close(req_wrap->object_);