Bug 967234: Don't block self-hosted code in the devtool client code; Debugger takes care of this. r=ejpbruel
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -3,17 +3,17 @@
/* 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";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const DBG_STRINGS_URI = "chrome://browser/locale/devtools/debugger.properties";
-const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "self-hosted", "XStringBundle"];
+const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"];
const NEW_SOURCE_DISPLAY_DELAY = 200; // ms
const FETCH_SOURCE_RESPONSE_DELAY = 200; // ms
const FETCH_EVENT_LISTENERS_DELAY = 200; // ms
const FRAME_STEP_CLEAR_DELAY = 100; // ms
const CALL_STACK_PAGE_SIZE = 25; // frames
// The panel's window global is an EventEmitter firing the following events:
const EVENTS = {
--- a/browser/devtools/webconsole/console-output.js
+++ b/browser/devtools/webconsole/console-output.js
@@ -92,17 +92,17 @@ const CONSOLE_API_LEVELS_TO_SEVERITIES =
groupCollapsed: "log",
groupEnd: "log",
time: "log",
timeEnd: "log",
count: "log"
};
// Array of known message source URLs we need to hide from output.
-const IGNORED_SOURCE_URLS = ["debugger eval code", "self-hosted"];
+const IGNORED_SOURCE_URLS = ["debugger eval code"];
// The maximum length of strings to be displayed by the Web Console.
const MAX_LONG_STRING_LENGTH = 200000;
// Regular expression that matches the allowed CSS property names when using
// the `window.console` API.
const RE_ALLOWED_STYLES = /^(?:-moz-)?(?:background|border|box|clear|color|cursor|display|float|font|line|margin|padding|text|transition|outline|white-space|word|writing|(?:min-|max-)?width|(?:min-|max-)?height)/;
--- a/browser/devtools/webconsole/webconsole.js
+++ b/browser/devtools/webconsole/webconsole.js
@@ -47,17 +47,17 @@ const STRICT_TRANSPORT_SECURITY_LEARN_MO
const WEAK_SIGNATURE_ALGORITHM_LEARN_MORE = "https://developer.mozilla.org/docs/Security/Weak_Signature_Algorithm";
const HELP_URL = "https://developer.mozilla.org/docs/Tools/Web_Console/Helpers";
const VARIABLES_VIEW_URL = "chrome://browser/content/devtools/widgets/VariablesView.xul";
const CONSOLE_DIR_VIEW_HEIGHT = 0.6;
-const IGNORED_SOURCE_URLS = ["debugger eval code", "self-hosted"];
+const IGNORED_SOURCE_URLS = ["debugger eval code"];
// The amount of time in milliseconds that we wait before performing a live
// search.
const SEARCH_DELAY = 200;
// The number of lines that are displayed in the console output by default, for
// each category. The user can change this number by adjusting the hidden
// "devtools.hud.loglimit.{network,cssparser,exception,console}" preferences.
--- a/toolkit/devtools/server/actors/script.js
+++ b/toolkit/devtools/server/actors/script.js
@@ -443,24 +443,24 @@ function ThreadActor(aParent, aGlobal)
this._scripts = null;
this._sources = null;
this._options = {
useSourceMaps: false,
autoBlackBox: false
};
- this.breakpointActorMap = new BreakpointActorMap();
- this.sourceActorStore = new SourceActorStore();
- this.blackBoxedSources = new Set(["self-hosted"]);
- this.prettyPrintedSources = new Map();
+ this.breakpointActorMap = new BreakpointActorMap;
+ this.sourceActorStore = new SourceActorStore;
+ this.blackBoxedSources = new Set;
+ this.prettyPrintedSources = new Map;
// A map of actorID -> actor for breakpoints created and managed by the
// server.
- this._hiddenBreakpoints = new Map();
+ this._hiddenBreakpoints = new Map;
this.global = aGlobal;
this._allEventsListener = this._allEventsListener.bind(this);
this.onNewGlobal = this.onNewGlobal.bind(this);
this.onNewSource = this.onNewSource.bind(this);
this.uncaughtExceptionHook = this.uncaughtExceptionHook.bind(this);
this.onDebuggerStatement = this.onDebuggerStatement.bind(this);
--- a/toolkit/devtools/server/actors/tracer.js
+++ b/toolkit/devtools/server/actors/tracer.js
@@ -15,21 +15,17 @@ Cu.import("resource://gre/modules/Task.j
// TODO bug 943125: remove this polyfill and use Debugger.Frame.prototype.depth
// once it is implemented.
function getFrameDepth(frame) {
if (typeof(frame.depth) != "number") {
if (!frame.older) {
frame.depth = 0;
} else {
- // Hide depth from self-hosted frames.
- const increment = frame.script && frame.script.url == "self-hosted"
- ? 0
- : 1;
- frame.depth = increment + getFrameDepth(frame.older);
+ frame.depth = getFrameDepth(frame.older) + 1;
}
}
return frame.depth;
}
const { setTimeout } = require("sdk/timers");
@@ -260,20 +256,16 @@ TracerActor.prototype = {
/**
* Called by the engine when a frame is entered. Sends an unsolicited packet
* to the client carrying requested trace information.
*
* @param aFrame Debugger.Frame
* The stack frame that was entered.
*/
onEnterFrame: function(aFrame) {
- if (aFrame.script && aFrame.script.url == "self-hosted") {
- return;
- }
-
Task.spawn(function*() {
// This function might request original (i.e. source-mapped) location,
// which is asynchronous. We need to ensure that packets are sent out
// in the correct order.
let runInOrder = this._packetScheduler.schedule();
let packet = {
type: "enteredFrame",