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

too much recursion error #731

Open
shmilyoo opened this issue Oct 14, 2021 · 0 comments · May be fixed by #1313
Open

too much recursion error #731

shmilyoo opened this issue Oct 14, 2021 · 0 comments · May be fixed by #1313

Comments

@shmilyoo
Copy link

shmilyoo commented Oct 14, 2021

系统报了这个错误,
error name = InternalError,
error message = too much recursion error
stack:

用户浏览器 firefox 93和92, 目前发现是这两个版本。 可以确定chrome不会触发。 因为业务系统绝大多数都是谷歌,但是报错收集的只有firefox。
对应错误位置是 original.set.call(this, value); 的 set这里
set的调用无限循环,直接导致页面崩溃。

触发的地方是页面的input输入框,我们自己的ui组件, 复现几率 非100%,偶发。

function hookSetter(target, key, d, isRevoked, win) {
    if (win === void 0) { win = window; }
    var original = win.Object.getOwnPropertyDescriptor(target, key);
    win.Object.defineProperty(target, key, isRevoked
        ? d
        : {
            set: function (value) {
                var _this = this;
                setTimeout(function () {
                    d.set.call(_this, value);
                }, 0);
                if (original && original.set) {
                    original.set.call(this, value);
                }
            },
        });
    return function () { return hookSetter(target, key, original || {}, true); };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant