GRAYBYTE WORDPRESS FILE MANAGER9765

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/node_modules/npm/node_modules/bluebird/js/release/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/node_modules/npm/node_modules/bluebird/js/release//cancel.js
"use strict";
module.exports = function(Promise, PromiseArray, apiRejection, debug) {
var util = require("./util");
var tryCatch = util.tryCatch;
var errorObj = util.errorObj;
var async = Promise._async;

Promise.prototype["break"] = Promise.prototype.cancel = function() {
    if (!debug.cancellation()) return this._warn("cancellation is disabled");

    var promise = this;
    var child = promise;
    while (promise._isCancellable()) {
        if (!promise._cancelBy(child)) {
            if (child._isFollowing()) {
                child._followee().cancel();
            } else {
                child._cancelBranched();
            }
            break;
        }

        var parent = promise._cancellationParent;
        if (parent == null || !parent._isCancellable()) {
            if (promise._isFollowing()) {
                promise._followee().cancel();
            } else {
                promise._cancelBranched();
            }
            break;
        } else {
            if (promise._isFollowing()) promise._followee().cancel();
            promise._setWillBeCancelled();
            child = promise;
            promise = parent;
        }
    }
};

Promise.prototype._branchHasCancelled = function() {
    this._branchesRemainingToCancel--;
};

Promise.prototype._enoughBranchesHaveCancelled = function() {
    return this._branchesRemainingToCancel === undefined ||
           this._branchesRemainingToCancel <= 0;
};

Promise.prototype._cancelBy = function(canceller) {
    if (canceller === this) {
        this._branchesRemainingToCancel = 0;
        this._invokeOnCancel();
        return true;
    } else {
        this._branchHasCancelled();
        if (this._enoughBranchesHaveCancelled()) {
            this._invokeOnCancel();
            return true;
        }
    }
    return false;
};

Promise.prototype._cancelBranched = function() {
    if (this._enoughBranchesHaveCancelled()) {
        this._cancel();
    }
};

Promise.prototype._cancel = function() {
    if (!this._isCancellable()) return;
    this._setCancelled();
    async.invoke(this._cancelPromises, this, undefined);
};

Promise.prototype._cancelPromises = function() {
    if (this._length() > 0) this._settlePromises();
};

Promise.prototype._unsetOnCancel = function() {
    this._onCancelField = undefined;
};

Promise.prototype._isCancellable = function() {
    return this.isPending() && !this._isCancelled();
};

Promise.prototype.isCancellable = function() {
    return this.isPending() && !this.isCancelled();
};

Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
    if (util.isArray(onCancelCallback)) {
        for (var i = 0; i < onCancelCallback.length; ++i) {
            this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
        }
    } else if (onCancelCallback !== undefined) {
        if (typeof onCancelCallback === "function") {
            if (!internalOnly) {
                var e = tryCatch(onCancelCallback).call(this._boundValue());
                if (e === errorObj) {
                    this._attachExtraTrace(e.e);
                    async.throwLater(e.e);
                }
            }
        } else {
            onCancelCallback._resultCancelled(this);
        }
    }
};

Promise.prototype._invokeOnCancel = function() {
    var onCancelCallback = this._onCancel();
    this._unsetOnCancel();
    async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
};

Promise.prototype._invokeInternalOnCancel = function() {
    if (this._isCancellable()) {
        this._doInvokeOnCancel(this._onCancel(), true);
        this._unsetOnCancel();
    }
};

Promise.prototype._resultCancelled = function() {
    this.cancel();
};

};

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:36:28
root / root
0755
any.js
0.411 KB
March 10 2021 14:36:36
root / root
0644
assert.js
1.614 KB
March 10 2021 14:36:36
root / root
0644
async.js
4.05 KB
March 10 2021 14:36:36
root / root
0644
bind.js
1.924 KB
March 10 2021 14:36:36
root / root
0644
bluebird.js
0.284 KB
March 10 2021 14:36:36
root / root
0644
call_get.js
4.253 KB
March 10 2021 14:36:36
root / root
0644
cancel.js
3.62 KB
March 10 2021 14:36:36
root / root
0644
catch_filter.js
1.393 KB
March 10 2021 14:36:36
root / root
0644
context.js
2.326 KB
March 10 2021 14:36:36
root / root
0644
debuggability.js
29.63 KB
March 10 2021 14:36:36
root / root
0644
direct_resolve.js
1.362 KB
March 10 2021 14:36:36
root / root
0644
each.js
0.771 KB
March 10 2021 14:36:36
root / root
0644
errors.js
3.63 KB
March 10 2021 14:36:36
root / root
0644
es5.js
1.932 KB
March 10 2021 14:36:36
root / root
0644
filter.js
0.307 KB
March 10 2021 14:36:36
root / root
0644
finally.js
4.505 KB
March 10 2021 14:36:36
root / root
0644
generators.js
7.579 KB
March 10 2021 14:36:36
root / root
0644
join.js
8.025 KB
March 10 2021 14:36:36
root / root
0644
map.js
5.251 KB
March 10 2021 14:36:36
root / root
0644
method.js
1.727 KB
March 10 2021 14:36:36
root / root
0644
nodeback.js
1.523 KB
March 10 2021 14:36:36
root / root
0644
nodeify.js
1.608 KB
March 10 2021 14:36:36
root / root
0644
promise.js
25.591 KB
March 10 2021 14:36:36
root / root
0644
promise_array.js
5.084 KB
March 10 2021 14:36:36
root / root
0644
promisify.js
11.896 KB
March 10 2021 14:36:36
root / root
0644
props.js
3.044 KB
March 10 2021 14:36:36
root / root
0644
queue.js
1.829 KB
March 10 2021 14:36:36
root / root
0644
race.js
1.221 KB
March 10 2021 14:36:36
root / root
0644
reduce.js
5.006 KB
March 10 2021 14:36:36
root / root
0644
schedule.js
2.098 KB
March 10 2021 14:36:36
root / root
0644
settle.js
1.233 KB
March 10 2021 14:36:36
root / root
0644
some.js
3.866 KB
March 10 2021 14:36:36
root / root
0644
synchronous_inspection.js
2.747 KB
March 10 2021 14:36:36
root / root
0644
thenables.js
2.081 KB
March 10 2021 14:36:36
root / root
0644
timers.js
2.339 KB
March 10 2021 14:36:36
root / root
0644
using.js
7.349 KB
March 10 2021 14:36:36
root / root
0644
util.js
10.279 KB
March 10 2021 14:36:36
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF