toolkit/devtools/server/dbg-server.jsm

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/devtools/server/dbg-server.jsm	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +"use strict";
    1.11 +/**
    1.12 + * Loads the remote debugging protocol code into a sandbox, in order to
    1.13 + * shield it from the debuggee. This way, when debugging chrome globals,
    1.14 + * debugger and debuggee will be in separate compartments.
    1.15 + */
    1.16 +
    1.17 +const Ci = Components.interfaces;
    1.18 +const Cc = Components.classes;
    1.19 +const Cu = Components.utils;
    1.20 +
    1.21 +const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
    1.22 +
    1.23 +this.EXPORTED_SYMBOLS = ["DebuggerServer", "ActorPool"];
    1.24 +
    1.25 +let server = devtools.require("devtools/server/main");
    1.26 +
    1.27 +this.DebuggerServer = server.DebuggerServer;
    1.28 +this.ActorPool = server.ActorPool;

mercurial