Skip to content

Commit

Permalink
Bug 1913773 - Ensure mCurrentShmem is valid. r=aosmond
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D219832

UltraBlame original commit: b62942faef2f7106add3113546adef97a14e05b2
  • Loading branch information
marco-c committed Aug 23, 2024
1 parent 68fd529 commit abcf33a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gfx/layers/ipc/CanvasTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,13 @@ if
(
mCurrentShmem
.
IsValid
(
)
&
&
mCurrentShmem
.
Size
(
)
Expand Down
29 changes: 29 additions & 0 deletions gfx/layers/ipc/CanvasTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2442,18 +2442,34 @@ SharedMemory
>
shmem
;
bool
IsValid
(
)
const
{
return
!
!
shmem
;
}
auto
Size
(
)
{
return
shmem
?
shmem
-
>
Size
(
)
:
0
;
}
gfx
Expand All @@ -2464,6 +2480,19 @@ CreateMemReader
(
)
{
if
(
!
shmem
)
{
return
{
nullptr
0
}
;
}
return
{
static_cast
Expand Down

0 comments on commit abcf33a

Please sign in to comment.