Closed Bug 846024 Opened 11 years ago Closed 8 years ago

Abort on shmem leaks during normal shutdown

Categories

(Core :: IPC, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
This patch can't land until we fix some leaks in the ImageBridge but it does catch them properly once my other patch lands to fix properly close the ImageBridge channel.
Attachment #719190 - Flags: review?(jones.chris.g)
Assignee: nobody → bgirard
Correct try link this time:
https://hg.mozilla.org/try/rev/4b2c7faa2dd5
Blocks: 839538
Depends on: 855408
Attachment #719190 - Flags: review?(cjones.bugs) → review?(bent.mozilla)
Comment on attachment 719190 [details] [diff] [review]
patch

Review of attachment 719190 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/ipc/ImageContainerChild.cpp
@@ +500,5 @@
>      mImageContainerChild(aProtocol), mAllocated(false) {}
>  
>    ~SharedPlanarYCbCrImage() {
>      if (mAllocated) {
> +      //mImageContainerChild->RecycleSharedImage(ToSharedImage());

Ignore this diff
Comment on attachment 719190 [details] [diff] [review]
patch

Review of attachment 719190 [details] [diff] [review]:
-----------------------------------------------------------------

::: ipc/ipdl/ipdl/lower.py
@@ +3389,5 @@
>              foreachdealloc.addstmt(StmtExpr(_shmemDealloc(shmem)))
>  
> +            ifnormalleak = StmtIf(ExprBinary(
> +                whyvar, '==', _DestroyReason.NormalShutdown))
> +            ifnormalleak.addifstmt(_runtimeAbort('Leaking Shmem'))

I think this is fine for child processes but the parent shouldn't crash on a leak like this imo. Maybe make this DEBUG-only for the parent process?
Attachment #719190 - Flags: review?(bent.mozilla) → review-
I don't really need this anymore.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: