Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r243820 - Crash in HTMLCanvasElement::createContext2d after the…
… element got adopted to a new document https://bugs.webkit.org/show_bug.cgi?id=196527 Reviewed by Antti Koivisto. We need to update CanvasBase::m_scriptExecutionContext when HTMLCanvasElement moves from one document to another. Fixed the bug by making CanvasBase::scriptExecutionContext make a virtual function call instead of directly storing a raw pointer. In HTMLCanvasElement, we use Node::scriptExecutionContext(). Use ContextDestructionObserver in CustomPaintCanvas and OffscreenCanvas instead of a raw pointer. Unfortunately, no new tests since there is no reproducible test case. * html/CanvasBase.cpp: (WebCore::CanvasBase::CanvasBase): * html/CanvasBase.h: (WebCore::CanvasBase::scriptExecutionContext const): * html/CustomPaintCanvas.cpp: (WebCore::CustomPaintCanvas::CustomPaintCanvas): * html/CustomPaintCanvas.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): * html/HTMLCanvasElement.h: * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::OffscreenCanvas): * html/OffscreenCanvas.h:
- Loading branch information
1 parent
12dfc06
commit 523a2ae
Showing
9 changed files
with
43 additions
and
11 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
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