Summary: | [Qt] Fail gracefully if an OpenGL context could not be created. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zeno Albisser <zeno> | ||||||
Component: | New Bugs | Assignee: | Zeno Albisser <zeno> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andy.shaw, bruno.abinader, dino, hausmann, jturcotte, noam, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Zeno Albisser
2013-04-02 08:12:56 PDT
Created attachment 196143 [details]
Patch
Comment on attachment 196143 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196143&action=review > Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:373 > - return context->m_private ? context.release() : 0; > + return (context->m_private && context->platformGraphicsContext3D()) ? context.release() : 0; To avoid spreading the failure logic I think it would be cleaner to add a check in GraphicsContext3D::GraphicsContext3D and set m_private = nullptr if (!m_private->m_platformContext). Something like changing "if (!m_private->m_surface) {" to "if (!m_private->m_surface || !m_private->m_platformContext) {" at line 398. Created attachment 196205 [details]
Patch
(In reply to comment #2) > To avoid spreading the failure logic I think it would be cleaner to add a check in GraphicsContext3D::GraphicsContext3D and set m_private = nullptr if (!m_private->m_platformContext). A very good point! Thx a lot! :) Comment on attachment 196205 [details] Patch Clearing flags on attachment: 196205 Committed r147553: <http://trac.webkit.org/changeset/147553> All reviewed patches have been landed. Closing bug. |