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

fix: fix crash when cancelAnimationFrame in frame callbacks. #317

Merged
merged 4 commits into from
Apr 14, 2023

Conversation

andycall
Copy link
Member

@andycall andycall commented Apr 11, 2023

Fix app crashed when canceling animationFrame inside of frame callback in iOS devices.

Crash demo:

    const div = document.createElement('div');
    div.onclick = () => {
        let t = requestAnimationFrame(() => {
            cancelAnimationFrame(t);
            document.body.appendChild(document.createTextNode('cleared'));
        });
    };
    div.textContent = 'click';
    document.body.appendChild(div);

@devjiangzhou devjiangzhou added this pull request to the merge queue Apr 14, 2023
Merged via the queue into main with commit 4275a40 Apr 14, 2023
@devjiangzhou devjiangzhou deleted the fix/animation_frame_crash branch April 14, 2023 15:00
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 this pull request may close these issues.

4 participants