Bug 1343754 - Label PLayerTransaction; r?bevistseng, kats draft
authorKevin Chen <kechen@mozilla.com>
Tue, 21 Mar 2017 03:57:56 +0000
changeset 571874 239fda2dc383d9c7a85ecdffee63cbd72d9b9f3b
parent 571873 055b523f99ada90f67ed950e4a796d3c20c9423c
child 626901 9f73b2ec0de31cd04fc9ca7556be8ddd5fe79243
push id56941
push userbmo:kechen@mozilla.com
push dateWed, 03 May 2017 12:15:09 +0000
reviewersbevistseng, kats
bugs1343754
milestone55.0a1
Bug 1343754 - Label PLayerTransaction; r?bevistseng, kats MozReview-Commit-ID: 8QF5SQKuFhY
gfx/layers/ipc/CompositorBridgeChild.cpp
--- a/gfx/layers/ipc/CompositorBridgeChild.cpp
+++ b/gfx/layers/ipc/CompositorBridgeChild.cpp
@@ -332,16 +332,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();