Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 259548.833@safari-7615-branch (c60c405). https://bugs.web…
…kit.org/show_bug.cgi?id=258058 Crash under WebCore::JSRequestAnimationFrameCallback::~JSRequestAnimationFrameCallback() https://bugs.webkit.org/show_bug.cgi?id=258058 rdar://110530772 Reviewed by Ryosuke Niwa. JSRequestAnimationFrameCallback were outliving the VM and thus using the VM after-free in their destructor. JS Wrapper should never outlive the VM. JSRequestAnimationFrameCallback are subclasses of RequestAnimationFrameCallback, which were being kept alive by the WorkerAnimationController via its m_animationCallbacks vector. To address the issue, WorkerAnimationController now clears m_animationCallbacks in stop(), which gets called when the global scope (and thus the VM) are about to go away. * LayoutTests/fast/workers/pending-requestAnimationFrame-upon-destruction-expected.txt: Added. * LayoutTests/fast/workers/pending-requestAnimationFrame-upon-destruction.html: Added. * LayoutTests/fast/workers/resources/pending-requestAnimationFrame-upon-destruction-popup.html: Added. * Source/WebCore/workers/WorkerAnimationController.cpp: (WebCore::WorkerAnimationController::stop): Canonical link: https://commits.webkit.org/259548.833@safari-7615-branch
- Loading branch information