tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

tracer.js (986B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 const {
      8  generateActorSpec,
      9  Arg,
     10  types,
     11 } = require("resource://devtools/shared/protocol.js");
     12 
     13 types.addDictType("tracer.start.options", {
     14  logMethod: "string",
     15  traceValues: "boolean",
     16  traceOnNextInteraction: "boolean",
     17  traceOnNextLoad: "boolean",
     18  traceDOMMutations: "nullable:array:string",
     19 });
     20 
     21 const tracerSpec = generateActorSpec({
     22  typeName: "tracer",
     23 
     24  methods: {
     25    startTracing: {
     26      request: {
     27        options: Arg(0, "tracer.start.options"),
     28      },
     29    },
     30    stopTracing: {
     31      request: {},
     32    },
     33  },
     34 });
     35 
     36 exports.tracerSpec = tracerSpec;
     37 
     38 const TRACER_LOG_METHODS = {
     39  DEBUGGER_SIDEBAR: "debugger-sidebar",
     40  STDOUT: "stdout",
     41  CONSOLE: "console",
     42  PROFILER: "profiler",
     43 };
     44 exports.TRACER_LOG_METHODS = TRACER_LOG_METHODS;