Skip to content

Commit

Permalink
Merged PR 4270393: [Git2Git] Merged PR 4264676: Guards the exceptions…
Browse files Browse the repository at this point in the history
… from PaintFrameForEngine to head off the Watsons

[Git2Git] Merged PR 4264676: Guards the exceptions from PaintFrameForEngine to head off the Watsons

Guards the exceptions from PaintFrameForEngine to head off the Watsons.
This will just enable it to retry again later. There's no real reason for it to crash and exceptions should never have left this function, so I made it noexcept as well.

Related work items: #21270995 Retrieved from official/rs_onecore_dep_uxp 08f8855377bde6d05fade032335fedf4d1387de2

Related work items: #21270995
  • Loading branch information
miniksa authored and DHowett committed Feb 3, 2020
1 parent b7b7cab commit eb480b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/renderer/base/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ Renderer::~Renderer()
return S_OK;
}

[[nodiscard]] HRESULT Renderer::_PaintFrameForEngine(_In_ IRenderEngine* const pEngine)
[[nodiscard]] HRESULT Renderer::_PaintFrameForEngine(_In_ IRenderEngine* const pEngine) noexcept
try
{
FAIL_FAST_IF_NULL(pEngine); // This is a programming error. Fail fast.

Expand Down Expand Up @@ -148,6 +149,7 @@ Renderer::~Renderer()
// As we leave the scope, EndPaint will be called (declared above)
return S_OK;
}
CATCH_RETURN()

void Renderer::_NotifyPaintFrame()
{
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/base/renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace Microsoft::Console::Render

void _NotifyPaintFrame();

[[nodiscard]] HRESULT _PaintFrameForEngine(_In_ IRenderEngine* const pEngine);
[[nodiscard]] HRESULT _PaintFrameForEngine(_In_ IRenderEngine* const pEngine) noexcept;

bool _CheckViewportAndScroll();

Expand Down

0 comments on commit eb480b6

Please sign in to comment.