Skip to content

Commit

Permalink
timers, bugfix: fix v8 deadlock in setHrInterval.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Oct 17, 2017
1 parent 838295b commit 4520bb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fibjs/src/base/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void Isolate::RequestInterrupt(v8::InterruptCallback callback, void* data)
CallbackData* cd = new CallbackData(this, callback, data);
cd->Ref();

if (m_isolate->IsInUse()) {
if (IsInUse()) {
cd->Ref();
m_isolate->RequestInterrupt(_InterruptCallback, cd);

Expand All @@ -240,7 +240,7 @@ void Isolate::RequestInterrupt(v8::InterruptCallback callback, void* data)

exlib::OSThread::sleep(1);

if (!cd->m_invoked) {
if (IsInUse() && !cd->m_invoked) {
cd->Ref();
m_isolate->RequestInterrupt(_InterruptCallback, cd);
}
Expand Down
2 changes: 1 addition & 1 deletion vender

0 comments on commit 4520bb3

Please sign in to comment.