Closed Bug 1219761 Opened 9 years ago Closed 9 years ago

Implement a destruction handshake in PCompositable similar to PTexture's to avoid races between messages and the protocol

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45

People

(Reporter: nical, Assigned: nical)

References

Details

Attachments

(1 file)

      No description provided.
This should fix the potential races between messages using a PCompositable actor and the actor's destruction.
Assignee: nobody → nical.bugzilla
Attachment #8680649 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8680649 [details] [diff] [review]
Move the deallocation handshake in a helper class and make PTexture and PCompositable use it.

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

Nice! Looks good.

::: gfx/layers/IPDLActor.h
@@ +96,5 @@
> +  ~ParentActor() { MOZ_ASSERT(mDestroyed); }
> +
> +  bool CanSend() const { return !mDestroyed; }
> +
> +  // Override this rather than ActorDestroy 

nits. Remove space at end of the line.

::: gfx/layers/client/CompositableClient.cpp
@@ +159,5 @@
>  
>  bool
>  CompositableClient::Connect(ImageContainer* aImageContainer)
>  {
> +  MOZ_ASSERT(!IsConnected());

Isn't it better just checking MOZ_ASSERT(!mCompositableChild)?

::: gfx/layers/client/TiledContentClient.h
@@ +647,5 @@
>  protected:
>    ~MultiTiledContentClient()
>    {
>      MOZ_COUNT_DTOR(MultiTiledContentClient);
>   

nits. Remove redundant space.

::: gfx/layers/ipc/PCompositable.ipdl
@@ +30,2 @@
>  };
>      

nits. Remove redundant spaces.
Attachment #8680649 - Flags: review?(sotaro.ikeda.g) → review+
Blocks: 1219529
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Depends on: 1261321
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: