Bug 1020257 - Dispatch hud events on the main window for system app related events. r=janx
☠☠ backed out by c8288d0c7a15 ☠ ☠
authorVivien Nicolas <vnicolas@mozilla.com>
Wed, 04 Jun 2014 20:11:06 +0200
changeset 206041 e0da2d69cfdb3511f97a2a7021aaf84468c9d3f3
parent 206040 0c8f92915f71e12b53c3d317dd2319f40d574527
child 206042 6ea33c3c5d669d3f5e12ceb3d20567c54fe1fcac
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.