<commit_before>module.exports = AnimationFrameRequest;

var Util = require('./Util');
var assert = Util.assert;
var isUndefOrNull = Util.isUndefOrNull;

// AnimationFrameRequest
// killMeFunc timeVirtualizer.(animFrameRequest id)
function AnimationFrameRequest(callback) {

    this._realId = timeVirtualizer._reals.requestAnimationFrame.call(
            window, this._onRealAnimationFrameFired.bind(this));
    this._killMeVirtualizerFunc = timeVirtualizer._cancelAnimationFrame;

    this._callback = callback;

    this._isVirtFired = false;
    this._isRealFired = false;
    this._isVirtMode = false;
};

AnimationFrameRequest.prototype.getId = function() {
    return this._realId;
};

AnimationFrameRequest.prototype.virtFire = function() {
    assert(this._isVirtMode, 'VirtFire in virt mode');
    this._isVirtFired = true;
    this._callCallback();
};

AnimationFrameRequest.prototype.virtualize = function() {
    if (this._isVirtMode) { return; }
    this._isVirtMode = true;
};<commit_msg>Remove obsolete field '_killMeVirtualizerFunc'<commit_after>module.exports = AnimationFrameRequest;

var Util = require('./Util');
var assert = Util.assert;
var isUndefOrNull = Util.isUndefOrNull;

// AnimationFrameRequest
// killMeFunc timeVirtualizer.(animFrameRequest id)
function AnimationFrameRequest(callback) {

    this._realId = timeVirtualizer._reals.requestAnimationFrame.call(
            window, this._onRealAnimationFrameFired.bind(this));

    this._callback = callback;

    this._isVirtFired = false;
    this._isRealFired = false;
    this._isVirtMode = false;
};

AnimationFrameRequest.prototype.getId = function() {
    return this._realId;
};

AnimationFrameRequest.prototype.virtFire = function() {
    assert(this._isVirtMode, 'VirtFire in virt mode');
    this._isVirtFired = true;
    this._callCallback();
};

AnimationFrameRequest.prototype.virtualize = function() {
    if (this._isVirtMode) { return; }
    this._isVirtMode = true;
};
{'fraction_non_alphanumeric': 0.11088504577822991, 'fraction_numerical': 0.0, 'mean_word_length': 4.540845070422535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4983704', 'n_tokens_mistral': 597, 'n_tokens_neox': 585, 'n_words': 105}