Bug 1343754 - Label PLayerTransaction. r?bevistseng, kats draft
authorKevin Chen <kechen@mozilla.com>
Tue, 21 Mar 2017 03:57:56 +0000
changeset 504304 da343a4f912a1af31963c6e43a554a326bc7dcf2
parent 504303 14a242081204d081dac15e57c7011f395e1b9498
child 550626 e2c7cf7318bdd0009a88260e15e0b0ffef3f8fa3
push id50773
push userbmo:kechen@mozilla.com
push dateFri, 24 Mar 2017 05:56:02 +0000
reviewersbevistseng, kats
bugs1343754
milestone55.0a1
Bug 1343754 - Label PLayerTransaction. r?bevistseng, kats MozReview-Commit-ID: 7hgt9dqzbyq
gfx/layers/ipc/CompositorBridgeChild.cpp
--- a/gfx/layers/ipc/CompositorBridgeChild.cpp
+++ b/gfx/layers/ipc/CompositorBridgeChild.cpp
@@ -329,16 +329,27 @@ CompositorBridgeChild::CompositorIsInGPU
 PLayerTransactionChild*
 CompositorBridgeChild::AllocPLayerTransactionChild(const nsTArray<LayersBackend>& aBackendHints,
                                                    const uint64_t& aId,
                                                    TextureFactoryIdentifier*,
                                                    bool*)
 {
   LayerTransactionChild* c = new LayerTransactionChild(aId);
   c->AddIPDLReference();
+
+  TabChild* tabChild = TabChild::GetFrom(c->GetId());
+
+  // Do the DOM Labeling.
+  if (tabChild) {
+    nsCOMPtr<nsIEventTarget> target =
+      tabChild->TabGroup()->EventTargetFor(TaskCategory::Other);
+    SetEventTargetForActor(c, target);
+    MOZ_ASSERT(c->GetActorEventTarget());
+  }
+
   return c;
 }
 
 bool
 CompositorBridgeChild::DeallocPLayerTransactionChild(PLayerTransactionChild* actor)
 {
   uint64_t childId = static_cast<LayerTransactionChild*>(actor)->GetId();