Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fs, handle_wrap: use Loop(), not uv_default_loop()
Browse files Browse the repository at this point in the history
Using the default loop will fail in unexpected and interesting ways when
isolates are used.
  • Loading branch information
bnoordhuis committed Jan 20, 2012
1 parent 2156e5e commit 4e52477
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/handle_wrap.cc
Expand Up @@ -89,7 +89,7 @@ Handle<Value> HandleWrap::Ref(const Arguments& args) {
}

wrap->unref = false;
uv_ref(uv_default_loop());
uv_ref(Loop());

return v8::Undefined();
}
Expand Down
2 changes: 1 addition & 1 deletion src/node_file.cc
Expand Up @@ -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_);
Expand Down

0 comments on commit 4e52477

Please sign in to comment.