mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-27 13:28:42 +00:00
240cfdae23
- Bug 1195615 - Log a web console warning when a HPKP header is ignored due to a non-built in root cert. r=keeler (dcd24f0163) - Bug 1156865 - Re-enable RDP logging in debugger xpcshell tests; r=jlongster (cb82a79d32) - Bug 848502 - Add a context menu to the debugger sources panel. r=vporof (58a299ded4) - Bug 1145262 - Modularize the pane views in the debugger. r=fitzgen (64b9eca0b5) - Bug 1145262 - Modularize the toolbar views in the debugger. r=fitzgen (c827d2ed92) - Bug 1167957 - Remove spidermonkey specific JS from debugger (795b7d00fb) - Bug 1160199 - Implement TabActor.listWorkers;r=jlong (b11fef647b) - Bug 1164077 - Implement WorkerActor.attach;r=jlong (d3c0a7c820) - Bug 1164564 - Clean up the helper functions for the debugger tests;r=jlong (b5d3bbbc99) - Bug 1164564 - Define an instance of the worker loader for worker threads;r=jlong (4eac1636b3) - Bug 1164564 - Implement WorkerActor.attachThread;r=jlong (fe1ac8ba3d) - Bug 1169343 - Implement DebuggerView.Workers;r=jlong (12996e5440) - Bug 1171967 - Emit newSource events on ThreadClient instead of DebuggerClient;r=pbrosset (417dce4d13) - Bug 1171967 - Implement WorkerTarget;r=jlong (c8963b9b35) - Bug 1189587: Tighten signature of pref_HashTableLookup. r=njn (de84745d54) - Bug 1188205 - Fix more constructors in netwerk; r=mcmanus (afcf42b3f8) - namespaces (867f2a3213) - Bug 1181319 - Correctly use NS_DECL_ISUPPORTS_INHERITED instead of NS_DECL_ISUPPORTS for DataChannelChild. r=mcmanus (bbe6681ea0) - Bug 1163909 - Remove nsFtpState::mSessionStartTime, which is dead. r=mcmanus. (f7c218ed91) - Bug 1170837 - Make nsMultiMixedConv not return an error when served only a package's metadata from the cache r=honzab (afb0684b1d)
136 lines
4.5 KiB
JavaScript
136 lines
4.5 KiB
JavaScript
/* 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";
|
|
|
|
/*
|
|
* Functions handling the stackframes classic list UI.
|
|
* Controlled by the DebuggerView.StackFrames isntance.
|
|
*/
|
|
function StackFramesClassicListView(DebuggerController, DebuggerView) {
|
|
dumpn("StackFramesClassicListView was instantiated");
|
|
|
|
this.DebuggerView = DebuggerView;
|
|
this._onSelect = this._onSelect.bind(this);
|
|
}
|
|
|
|
StackFramesClassicListView.prototype = Heritage.extend(WidgetMethods, {
|
|
/**
|
|
* Initialization function, called when the debugger is started.
|
|
*/
|
|
initialize: function() {
|
|
dumpn("Initializing the StackFramesClassicListView");
|
|
|
|
this.widget = new SideMenuWidget(document.getElementById("callstack-list"));
|
|
this.widget.addEventListener("select", this._onSelect, false);
|
|
|
|
this.emptyText = L10N.getStr("noStackFramesText");
|
|
this.autoFocusOnFirstItem = false;
|
|
this.autoFocusOnSelection = false;
|
|
|
|
// This view's contents are also mirrored in a different container.
|
|
this._mirror = this.DebuggerView.StackFrames;
|
|
},
|
|
|
|
/**
|
|
* Destruction function, called when the debugger is closed.
|
|
*/
|
|
destroy: function() {
|
|
dumpn("Destroying the StackFramesClassicListView");
|
|
|
|
this.widget.removeEventListener("select", this._onSelect, false);
|
|
},
|
|
|
|
/**
|
|
* Adds a frame in this stackframes container.
|
|
*
|
|
* @param string aTitle
|
|
* The frame title (function name).
|
|
* @param string aUrl
|
|
* The frame source url.
|
|
* @param string aLine
|
|
* The frame line number.
|
|
* @param number aDepth
|
|
* The frame depth in the stack.
|
|
*/
|
|
addFrame: function(aTitle, aUrl, aLine, aDepth) {
|
|
// Create the element node for the stack frame item.
|
|
let frameView = this._createFrameView.apply(this, arguments);
|
|
|
|
// Append a stack frame item to this container.
|
|
this.push([frameView], {
|
|
attachment: {
|
|
depth: aDepth
|
|
}
|
|
});
|
|
},
|
|
|
|
/**
|
|
* Customization function for creating an item's UI.
|
|
*
|
|
* @param string aTitle
|
|
* The frame title to be displayed in the list.
|
|
* @param string aUrl
|
|
* The frame source url.
|
|
* @param string aLine
|
|
* The frame line number.
|
|
* @param number aDepth
|
|
* The frame depth in the stack.
|
|
* @return nsIDOMNode
|
|
* The stack frame view.
|
|
*/
|
|
_createFrameView: function(aTitle, aUrl, aLine, aDepth) {
|
|
let container = document.createElement("hbox");
|
|
container.id = "classic-stackframe-" + aDepth;
|
|
container.className = "dbg-classic-stackframe";
|
|
container.setAttribute("flex", "1");
|
|
|
|
let frameTitleNode = document.createElement("label");
|
|
frameTitleNode.className = "plain dbg-classic-stackframe-title";
|
|
frameTitleNode.setAttribute("value", aTitle);
|
|
frameTitleNode.setAttribute("crop", "center");
|
|
|
|
let frameDetailsNode = document.createElement("hbox");
|
|
frameDetailsNode.className = "plain dbg-classic-stackframe-details";
|
|
|
|
let frameUrlNode = document.createElement("label");
|
|
frameUrlNode.className = "plain dbg-classic-stackframe-details-url";
|
|
frameUrlNode.setAttribute("value", SourceUtils.getSourceLabel(aUrl));
|
|
frameUrlNode.setAttribute("crop", "center");
|
|
frameDetailsNode.appendChild(frameUrlNode);
|
|
|
|
let frameDetailsSeparator = document.createElement("label");
|
|
frameDetailsSeparator.className = "plain dbg-classic-stackframe-details-sep";
|
|
frameDetailsSeparator.setAttribute("value", SEARCH_LINE_FLAG);
|
|
frameDetailsNode.appendChild(frameDetailsSeparator);
|
|
|
|
let frameLineNode = document.createElement("label");
|
|
frameLineNode.className = "plain dbg-classic-stackframe-details-line";
|
|
frameLineNode.setAttribute("value", aLine);
|
|
frameDetailsNode.appendChild(frameLineNode);
|
|
|
|
container.appendChild(frameTitleNode);
|
|
container.appendChild(frameDetailsNode);
|
|
|
|
return container;
|
|
},
|
|
|
|
/**
|
|
* The select listener for the stackframes container.
|
|
*/
|
|
_onSelect: function(e) {
|
|
let stackframeItem = this.selectedItem;
|
|
if (stackframeItem) {
|
|
// The container is not empty and an actual item was selected.
|
|
// Mirror the selected item in the breadcrumbs list.
|
|
let depth = stackframeItem.attachment.depth;
|
|
this._mirror.selectedItem = e => e.attachment.depth == depth;
|
|
}
|
|
},
|
|
|
|
_mirror: null
|
|
});
|
|
|
|
DebuggerView.StackFramesClassicList = new StackFramesClassicListView(DebuggerController,
|
|
DebuggerView);
|