Bug 818382 - Support chrome debugging in Firefox for Android; r=mfinkle
authorPanos Astithas <past@mozilla.com>
Thu, 21 Feb 2013 08:44:03 +0200
changeset 122511 bcbe8d700ea5fbc87b78dd06ddecbb87a4f9c94b
parent 122510 4e6834c859a8410c4acb4a131dba78231ac0ce78
child 122512 b6d2ac238d95c905baa31fabc2db2f864c36c063
push id24342
push userryanvm@gmail.com
push dateThu, 21 Feb 2013 13:05:06 +0000
treeherdermozilla-central@702d2814efbf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs818382
milestone22.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 818382 - Support chrome debugging in Firefox for Android; r=mfinkle
mobile/android/chrome/content/dbg-browser-actors.js
--- a/mobile/android/chrome/content/dbg-browser-actors.js
+++ b/mobile/android/chrome/content/dbg-browser-actors.js
@@ -40,16 +40,25 @@ DeviceRootActor.prototype = new BrowserR
 DeviceRootActor.prototype.onListTabs = function DRA_onListTabs() {
   // Get actors for all the currently-running tabs (reusing
   // existing actors where applicable), and store them in
   // an ActorPool.
 
   let actorPool = new ActorPool(this.conn);
   let tabActorList = [];
 
+  // Get the chrome debugger actor.
+  let actor = this._chromeDebugger;
+  if (!actor) {
+    actor = new ChromeDebuggerActor(this);
+    actor.parentID = this.actorID;
+    this._chromeDebugger = actor;
+    actorPool.addActor(actor);
+  }
+
   let win = windowMediator.getMostRecentWindow("navigator:browser");
   this.browser = win.BrowserApp.selectedBrowser;
 
   // Watch the window for tab closes so we can invalidate
   // actors as needed.
   this.watchWindow(win);
 
   let tabs = win.BrowserApp.tabs;
@@ -83,17 +92,18 @@ DeviceRootActor.prototype.onListTabs = f
   }
 
   this._tabActorPool = actorPool;
   this.conn.addActorPool(this._tabActorPool);
 
   let response = {
     "from": "root",
     "selected": selected,
-    "tabs": [actor.grip() for (actor of tabActorList)]
+    "tabs": [actor.grip() for (actor of tabActorList)],
+    "chromeDebugger": this._chromeDebugger.actorID
   };
   this._appendExtraActors(response);
   return response;
 };
 
 /**
  * Return the tab container for the specified window.
  */