-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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.787@safari-7615-branch (88ed382). https://bugs.web…
…kit.org/show_bug.cgi?id=257234 Ensure CanvasBase remains alive while in use https://bugs.webkit.org/show_bug.cgi?id=257234 rdar://109540621 Reviewed by Chris Dumez. A HTMLCanvasElement could be destroyed when it calls CanvasBase::setImageBuffer because that call could trigger a GC. We've seen crashes originating from HTMLCanvasElement::setImageBufferAndMarkDirty, but this patch adds protection around other setImageBuffer call sites, as well. * Source/WebCore/html/CanvasBase.h: (WebCore::CanvasBase::ref): (WebCore::CanvasBase::deref): * Source/WebCore/html/HTMLCanvasElement.h: * Source/WebCore/html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::create): (WebCore::OffscreenCanvas::setPlaceholderCanvas): (WebCore::OffscreenCanvas::pushBufferToPlaceholder): * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): * Source/WebCore/rendering/style/StyleCanvasImage.cpp: (WebCore::StyleCanvasImage::image const): Canonical link: https://commits.webkit.org/259548.787@safari-7615-branch
- Loading branch information
1 parent
5898307
commit 83d9025
Showing
5 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters