AtomBindings should not use default uv loop

This commit is contained in:
Cheng Zhao 2017-03-10 17:07:51 +09:00
parent 9c9c8ec5f1
commit c068285ff8
7 changed files with 14 additions and 10 deletions

View file

@ -78,8 +78,8 @@ void FatalErrorCallback(const char* location, const char* message) {
} // namespace
AtomBindings::AtomBindings() {
uv_async_init(uv_default_loop(), &call_next_tick_async_, OnCallNextTick);
AtomBindings::AtomBindings(uv_loop_t* loop) {
uv_async_init(loop, &call_next_tick_async_, OnCallNextTick);
call_next_tick_async_.data = this;
}

View file

@ -20,7 +20,7 @@ namespace atom {
class AtomBindings {
public:
AtomBindings();
explicit AtomBindings(uv_loop_t* loop);
virtual ~AtomBindings();
// Add process.atomBinding function, which behaves like process.binding but