Bug 1020257 - Dispatch hud events on the main window for system app related events. r=janx
☠☠ backed out by 616163ca1aa5 ☠ ☠
authorVivien Nicolas <vnicolas@mozilla.com>
Wed, 04 Jun 2014 20:11:06 +0200
changeset 205887 dbcb9974b640b6846647b44c7995844c612eb0bb
parent 205886 3220b7b2efc9022dde350eaa21528d065e6c7db9
child 205888 af052494ad4edc374f795230c98b6073307b73b3
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanx
bugs1020257
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1020257 - Dispatch hud events on the main window for system app related events. r=janx
b2g/chrome/content/devtools.js
--- a/b2g/chrome/content/devtools.js
+++ b/b2g/chrome/content/devtools.js
@@ -267,17 +267,24 @@ Target.prototype = {
    * widgets.
    */
   destroy: function target_destroy() {
     delete this.metrics;
     this._send({});
   },
 
   _send: function target_send(data) {
-    shell.sendEvent(this.frame, 'developer-hud-update', Cu.cloneInto(data, this.frame));
+    let frame = this.frame;
+
+    let systemapp = document.querySelector('#systemapp');
+    if (this.frame === systemapp) {
+      frame = getContentWindow();
+    }
+
+    shell.sendEvent(frame, 'developer-hud-update', Cu.cloneInto(data, target));
   }
 
 };
 
 
 /**
  * The Console Watcher tracks the following metrics in apps: reflows, warnings,
  * and errors, with security errors reported separately.