webapprt/RemoteDebugger.jsm
author Dan Gohman <sunfish@google.com>
Fri, 27 Sep 2013 11:51:28 -0700
changeset 149404 64222cba97fa9e43fad40344b8369a116e2bc3c5
parent 146896 8a0b5eb332ff958338e5a6bf8e57eff2ff5830fe
permissions -rw-r--r--
Backed out changeset 8bb615862099 (bug 875656) for introducing a subtle regalloc miscompile.

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

"use strict";

this.EXPORTED_SYMBOLS = ["RemoteDebugger"];

let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;

Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import('resource://gre/modules/devtools/dbg-server.jsm');

this.RemoteDebugger = {
  init: function(port) {
    if (!DebuggerServer.initialized) {
      DebuggerServer.init();
      DebuggerServer.addBrowserActors("webapprt:webapp");
      DebuggerServer.addActors("chrome://webapprt/content/dbg-webapp-actors.js");
    }
    DebuggerServer.openListener(port);
  }
}