Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 265870.579@safari-7616-branch (587ed30). https://bugs.web…
…kit.org/show_bug.cgi?id=261829 Regression(265870.536@safari-7616-branch) Crashes under DeferredPromise::callFunction() https://bugs.webkit.org/show_bug.cgi?id=261829 rdar://115712299 Reviewed by Brent Fulgham and Mark Lam. The RELEASE_ASSERT() added by Ryosuke in 265870.536@safari-7616-branch in DeferredPromise::callFunction() is hitting a lot in the wild, from various call sites. The assertion makes sure we're allowed to run script when resolving a promise (i.e. we're not in the middle of layout or style resolution). * LayoutTests/webaudio/promise-resolution-crash-expected.txt: Added. * LayoutTests/webaudio/promise-resolution-crash.html: Added. New test coverage. * Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp: (WebCore::DeferredPromise::callFunction): Drop the release assertion and instead schedule a task to resolve the promise asynchronously when we're not allowed to run script, similarly to what we were already doing when b/f cache suspended. Canonical link: https://commits.webkit.org/265870.579@safari-7616-branch
- Loading branch information