Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure the validation queue does not freeze when an error occurred during validation. #964

Open
wants to merge 1 commit into
base: v1.3.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions source/feathers/core/ValidationQueue.as
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,19 @@ package feathers.core
return;
}
this._isValidating = true;
this._queue = this._queue.sort(queueSortFunction);
while(this._queue.length > 0) //rechecking length after the shift
{
var item:IValidating = this._queue.shift();
item.validate();
try {
this._queue = this._queue.sort(queueSortFunction);
while(this._queue.length > 0) //rechecking length after the shift
{
var item:IValidating = this._queue.shift();
item.validate();
}
const temp:Vector.<IValidating> = this._queue;
this._queue = this._delayedQueue;
this._delayedQueue = temp;
} finally {
this._isValidating = false;
}
const temp:Vector.<IValidating> = this._queue;
this._queue = this._delayedQueue;
this._delayedQueue = temp;
this._isValidating = false;
}

/**
Expand Down