Bug 1148753 - Update browser content toolbox to create a TabSources instance. r=jryans, a=lizzard
authorJames Long <longster@gmail.com>
Mon, 30 Mar 2015 09:29:00 -0400
changeset 265496 a5e2ccf127b8dac12961602ff4fed747103825ce
parent 265495 1d66ed2ccb3c850d65ed27645d12aaea438fecd5
child 265497 1574cebc9661f0e2d7f0a5f669b65f15c1f2a625
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans, lizzard
bugs1148753
milestone39.0a2
Bug 1148753 - Update browser content toolbox to create a TabSources instance. r=jryans, a=lizzard
toolkit/devtools/server/actors/child-process.js
--- a/toolkit/devtools/server/actors/child-process.js
+++ b/toolkit/devtools/server/actors/child-process.js
@@ -6,16 +6,18 @@
 
 const { Cc, Ci, Cu } = require("chrome");
 
 const { ChromeDebuggerActor } = require("devtools/server/actors/script");
 const { WebConsoleActor } = require("devtools/server/actors/webconsole");
 const makeDebugger = require("devtools/server/actors/utils/make-debugger");
 const { ActorPool } = require("devtools/server/main");
 const Services = require("Services");
+const { dbg_assert } = require("devtools/toolkit/DevToolsUtils");
+const { TabSources } = require("./utils/TabSources");
 
 function ChildProcessActor(aConnection) {
   this.conn = aConnection;
   this._contextPool = new ActorPool(this.conn);
   this.conn.addActorPool(this._contextPool);
   this._threadActor = null;
 
   // Use a see-everything debugger
@@ -45,16 +47,24 @@ ChildProcessActor.prototype = {
   get url() {
     return undefined;
   },
 
   get window() {
     return this._consoleScope;
   },
 
+  get sources() {
+    if (!this._sources) {
+      dbg_assert(this._threadActor, "threadActor should exist when creating sources.");
+      this._sources = new TabSources(this._threadActor);
+    }
+    return this._sources;
+  },
+
   form: function() {
     if (!this._consoleActor) {
       this._consoleActor = new WebConsoleActor(this.conn, this);
       this._contextPool.addActor(this._consoleActor);
     }
 
     if (!this._threadActor) {
       this._threadActor = new ChromeDebuggerActor(this.conn, this);