Skip to content

Commit

Permalink
Fix use-after-move in WebCore::WebGLRenderingContextBase constructor
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=267818
<rdar://121317766>

Reviewed by Chris Dumez.

* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
- Use m_attributes to initialize m_creationAttributes since `attributes`
  was moved from to initialize m_attributes.

Canonical link: https://commits.webkit.org/273267@main
  • Loading branch information
David Kilzer authored and ddkilzer committed Jan 21, 2024
1 parent 744d120 commit 40e738b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ WebGLRenderingContextBase::WebGLRenderingContextBase(CanvasBase& canvas, WebGLCo
: GPUBasedCanvasRenderingContext(canvas)
, m_generatedImageCache(4)
, m_attributes(WTFMove(attributes))
, m_creationAttributes(attributes)
, m_creationAttributes(m_attributes)
, m_numGLErrorsToConsoleAllowed(canvas.scriptExecutionContext()->settingsValues().webGLErrorsToConsoleEnabled ? maxGLErrorsAllowedToConsole : 0)
{
}
Expand Down

0 comments on commit 40e738b

Please sign in to comment.