Repository navigation
fix: capturePage not resolving with hidden windows - #27883
Conversation
f79326b to
38cfd22
Compare
38cfd22 to
814abb4
Compare
|
@codebytere #27892 looks like a better solution to this issue as well, it has also narrowed down the root issue. |
|
@deepak1556 @codebytere I've made some testing and my fix (#27892) doesn't cover all cases: it may happen that callback isn't called at all. It can be reproduced by test added to this pr. I've checked that this fix covers both cases: with it both tests (mine and the one added by this pr) pass. I'd say: let's close my pr and merge this one. |
|
I am good with adding this fix back, but in your PR it is indicated that the responses sometime come back on a different thread is that only the case for hidden pages ? |
|
Yes, I've checked that this fix also covers my test case. It seems that without any fix callback is called on bad thread or it's not called at all for hidden pages so this fix should cover both cases. |
|
Thanks for clarifying, @codebytere wanna revive this PR ? |
|
It seems that we all agree to merge this fix instead of #27892. |
|
Release Notes Persisted
|
|
I have automatically backported this PR to "11-x-y", please check out #28074 |
|
I have automatically backported this PR to "12-x-y", please check out #28075 |
|
I have automatically backported this PR to "13-x-y", please check out #28076 |
|
hi guys, this issue still occurs.
|
Description of Change
Closes #6015.
Closes #27891.
If the renderer is suspended or otherwise occluded, there's no guarantee that
view->CopyFromSurfacewill ever be called and thus the promise ever resolved (see here). Handle this by checking for the current page visibility and returning an empty image if this is the case.cc @ckerr @zcbenz @MarshallOfSound @deepak1556
Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where
win.capturePage()never called back after callinghide()for a hidden window on some platforms.