|
351 | 351 | for (i = 0; i < ccQueue.length; i++) { |
352 | 352 | queueItem = ccQueue[i]; |
353 | 353 | queue[queue.length] = queueItem; |
354 | | - if ((queueItem.flags & HAS_CREATE_AL) === 0) { |
| 354 | + if ((queueItem.callback_flags & HAS_CREATE_AL) === 0) { |
355 | 355 | data[queueItem.uid] = queueItem.data; |
356 | 356 | continue; |
357 | 357 | } |
|
369 | 369 | if (data[queueItem.uid] !== undefined) |
370 | 370 | continue; |
371 | 371 | queue[queue.length] = queueItem; |
372 | | - context._asyncFlags |= queueItem.flags; |
373 | | - if ((queueItem.flags & HAS_CREATE_AL) === 0) { |
| 372 | + context._asyncFlags |= queueItem.callback_flags; |
| 373 | + if ((queueItem.callback_flags & HAS_CREATE_AL) === 0) { |
374 | 374 | data[queueItem.uid] = queueItem.data; |
375 | 375 | continue; |
376 | 376 | } |
|
397 | 397 | inAsyncTick = true; |
398 | 398 | for (i = 0; i < queue.length; i++) { |
399 | 399 | queueItem = queue[i]; |
400 | | - if ((queueItem.flags & HAS_BEFORE_AL) > 0) |
| 400 | + if ((queueItem.callback_flags & HAS_BEFORE_AL) > 0) |
401 | 401 | queueItem.before(context, data[queueItem.uid]); |
402 | 402 | } |
403 | 403 | inAsyncTick = false; |
|
418 | 418 | inAsyncTick = true; |
419 | 419 | for (i = 0; i < queue.length; i++) { |
420 | 420 | queueItem = queue[i]; |
421 | | - if ((queueItem.flags & HAS_AFTER_AL) > 0) |
| 421 | + if ((queueItem.callback_flags & HAS_AFTER_AL) > 0) |
422 | 422 | queueItem.after(context, data[queueItem.uid]); |
423 | 423 | } |
424 | 424 | inAsyncTick = false; |
|
445 | 445 | var data = currentContext._asyncData; |
446 | 446 | for (i = 0; i < queue.length; i++) { |
447 | 447 | queueItem = queue[i]; |
448 | | - if ((queueItem.flags & HAS_ERROR_AL) === 0) |
| 448 | + if ((queueItem.callback_flags & HAS_ERROR_AL) === 0) |
449 | 449 | continue; |
450 | 450 | try { |
451 | 451 | threw = true; |
|
469 | 469 | if (asyncQueue) { |
470 | 470 | for (i = 0; i < asyncQueue.length; i++) { |
471 | 471 | queueItem = asyncQueue[i]; |
472 | | - if ((queueItem.flags & HAS_ERROR_AL) === 0 || |
| 472 | + if ((queueItem.callback_flags & HAS_ERROR_AL) === 0 || |
473 | 473 | (data && data[queueItem.uid] !== undefined)) |
474 | 474 | continue; |
475 | 475 | try { |
|
501 | 501 | function AsyncListenerInst(callbacks, data) { |
502 | 502 | if (typeof callbacks.create === 'function') { |
503 | 503 | this.create = callbacks.create; |
504 | | - this.flags |= HAS_CREATE_AL; |
| 504 | + this.callback_flags |= HAS_CREATE_AL; |
505 | 505 | } |
506 | 506 | if (typeof callbacks.before === 'function') { |
507 | 507 | this.before = callbacks.before; |
508 | | - this.flags |= HAS_BEFORE_AL; |
| 508 | + this.callback_flags |= HAS_BEFORE_AL; |
509 | 509 | } |
510 | 510 | if (typeof callbacks.after === 'function') { |
511 | 511 | this.after = callbacks.after; |
512 | | - this.flags |= HAS_AFTER_AL; |
| 512 | + this.callback_flags |= HAS_AFTER_AL; |
513 | 513 | } |
514 | 514 | if (typeof callbacks.error === 'function') { |
515 | 515 | this.error = callbacks.error; |
516 | | - this.flags |= HAS_ERROR_AL; |
| 516 | + this.callback_flags |= HAS_ERROR_AL; |
517 | 517 | } |
518 | 518 |
|
519 | 519 | this.uid = ++alUid; |
|
525 | 525 | AsyncListenerInst.prototype.error = undefined; |
526 | 526 | AsyncListenerInst.prototype.data = undefined; |
527 | 527 | AsyncListenerInst.prototype.uid = 0; |
528 | | - AsyncListenerInst.prototype.flags = 0; |
| 528 | + AsyncListenerInst.prototype.callback_flags = 0; |
529 | 529 |
|
530 | 530 | // Create new async listener object. Useful when instantiating a new |
531 | 531 | // object and want the listener instance, but not add it to the stack. |
|
0 commit comments