зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1430855 - Update Debugger Frontend v9.1. r=jdescottes
MozReview-Commit-ID: CnJ3iP3tjAw
This commit is contained in:
Родитель
7960a042d1
Коммит
c05fed43cf
|
@ -1,9 +1,9 @@
|
|||
This is the debugger.html project output.
|
||||
See https://github.com/devtools-html/debugger.html
|
||||
|
||||
Version 9.0
|
||||
commit: https://github.com/devtools-html/debugger.html/commit/0de8d3f673ee0f0030d666f1827380e17bef8036
|
||||
comparison: https://github.com/devtools-html/debugger.html/compare/release-8...release-9
|
||||
Version 9.1
|
||||
commit: https://github.com/devtools-html/debugger.html/commit/3fbfed14525b26de4716db2a6447e2d612f4ff6a
|
||||
comparison: https://github.com/devtools-html/debugger.html/compare/release-9...release-9-1
|
||||
|
||||
Packages:
|
||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
||||
|
|
|
@ -1533,7 +1533,7 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
.sources-list .managed-tree .tree .node.focused img.blackBox {
|
||||
.sources-list .managed-tree .tree .node.focused img {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
|
|
@ -18740,7 +18740,7 @@ function isNotJavaScript(source) {
|
|||
}
|
||||
|
||||
function isInvalidUrl(url, source) {
|
||||
return IGNORED_URLS.indexOf(url) != -1 || !source.get("url") || source.get("loadedState") === "loading" || !url.group || (0, _source.isPretty)(source) || isNotJavaScript(source);
|
||||
return IGNORED_URLS.indexOf(url) != -1 || !source.get("url") || !url.group || (0, _source.isPretty)(source) || isNotJavaScript(source);
|
||||
}
|
||||
|
||||
function partIsFile(index, parts, url) {
|
||||
|
@ -21547,8 +21547,8 @@ function setSymbols(sourceId) {
|
|||
|
||||
const symbols = await (0, _parser.getSymbols)(source);
|
||||
dispatch({ type: "SET_SYMBOLS", source, symbols });
|
||||
dispatch(setEmptyLines(source.id));
|
||||
dispatch(setSourceMetaData(source.id));
|
||||
dispatch(setEmptyLines(sourceId));
|
||||
dispatch(setSourceMetaData(sourceId));
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -21584,7 +21584,10 @@ function setOutOfScopeLocations() {
|
|||
|
||||
const source = (0, _selectors.getSource)(getState(), location.sourceId);
|
||||
|
||||
const locations = !location.line || !source ? null : await (0, _parser.findOutOfScopeLocations)(source.toJS(), location);
|
||||
let locations = null;
|
||||
if (location.line && source && (0, _selectors.isPaused)(getState())) {
|
||||
locations = await (0, _parser.findOutOfScopeLocations)(source.toJS(), location);
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: "OUT_OF_SCOPE_LOCATIONS",
|
||||
|
@ -24436,8 +24439,6 @@ var _devtoolsSourceMap = __webpack_require__(1360);
|
|||
|
||||
var _promise = __webpack_require__(1653);
|
||||
|
||||
var _ast = __webpack_require__(1399);
|
||||
|
||||
var _selectors = __webpack_require__(1352);
|
||||
|
||||
var _parser = __webpack_require__(1365);
|
||||
|
@ -24456,12 +24457,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
const requests = new Map(); /* 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/>. */
|
||||
|
||||
const requests = new Map();
|
||||
|
||||
async function loadSource(source, { sourceMaps, client }) {
|
||||
const id = source.get("id");
|
||||
if ((0, _devtoolsSourceMap.isOriginalId)(id)) {
|
||||
|
@ -24536,7 +24535,6 @@ function loadSourceText(source) {
|
|||
|
||||
if (!newSource.isWasm) {
|
||||
await parser.setSource(newSource);
|
||||
dispatch((0, _ast.setSymbols)(id));
|
||||
}
|
||||
|
||||
// signal that the action is finished
|
||||
|
@ -49179,14 +49177,23 @@ function createOriginalSource(originalUrl, generatedSource, sourceMaps) {
|
|||
};
|
||||
}
|
||||
|
||||
// TODO: It would be nice to make getOriginalURLs a safer api
|
||||
async function loadOriginalSourceUrls(sourceMaps, generatedSource) {
|
||||
try {
|
||||
return await sourceMaps.getOriginalURLs(generatedSource);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof actions/sources
|
||||
* @static
|
||||
*/
|
||||
function loadSourceMap(generatedSource) {
|
||||
return async function ({ dispatch, getState, sourceMaps }) {
|
||||
const urls = await sourceMaps.getOriginalURLs(generatedSource);
|
||||
|
||||
const urls = await loadOriginalSourceUrls(sourceMaps, generatedSource);
|
||||
if (!urls) {
|
||||
// If this source doesn't have a sourcemap, do nothing.
|
||||
return;
|
||||
|
@ -49448,11 +49455,17 @@ function selectLocation(location, tabIndex = "") {
|
|||
|
||||
await dispatch((0, _loadSourceText.loadSourceText)(source));
|
||||
const selectedSource = (0, _selectors.getSelectedSource)(getState());
|
||||
if (_prefs.prefs.autoPrettyPrint && !(0, _selectors.getPrettySource)(getState(), selectedSource.get("id")) && (0, _source.shouldPrettyPrint)(selectedSource) && (0, _source.isMinified)(selectedSource)) {
|
||||
await dispatch((0, _prettyPrint.togglePrettyPrint)(source.get("id")));
|
||||
if (!selectedSource) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sourceId = selectedSource.get("id");
|
||||
if (_prefs.prefs.autoPrettyPrint && !(0, _selectors.getPrettySource)(getState(), sourceId) && (0, _source.shouldPrettyPrint)(selectedSource) && (0, _source.isMinified)(selectedSource)) {
|
||||
await dispatch((0, _prettyPrint.togglePrettyPrint)(sourceId));
|
||||
dispatch((0, _tabs.closeTab)(source.get("url")));
|
||||
}
|
||||
|
||||
dispatch((0, _ast.setSymbols)(sourceId));
|
||||
dispatch((0, _ast.setOutOfScopeLocations)());
|
||||
};
|
||||
}
|
||||
|
|
|
@ -35475,11 +35475,6 @@ module.exports = {
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* 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/>. */
|
||||
|
||||
exports.parseScript = parseScript;
|
||||
exports.getAst = getAst;
|
||||
exports.clearASTs = clearASTs;
|
||||
|
@ -35505,14 +35500,23 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* 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/>. */
|
||||
|
||||
let ASTs = new Map();
|
||||
|
||||
function _parse(code, opts) {
|
||||
return babylon.parse(code, _extends({}, opts, {
|
||||
return babylon.parse(code, opts);
|
||||
}
|
||||
|
||||
const sourceOptions = {
|
||||
generated: {},
|
||||
original: {
|
||||
sourceType: "module",
|
||||
plugins: ["jsx", "flow", "doExpressions", "objectRestSpread", "classProperties", "exportExtensions", "asyncGenerators", "functionBind", "functionSent", "dynamicImport", "templateInvalidEscapes"]
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
function parse(text, opts) {
|
||||
let ast;
|
||||
|
@ -35532,9 +35536,7 @@ function parse(text, opts) {
|
|||
// Custom parser for parse-script-tags that adapts its input structure to
|
||||
// our parser's signature
|
||||
function htmlParser({ source, line }) {
|
||||
return parse(source, {
|
||||
startLine: line
|
||||
});
|
||||
return parse(source, { startLine: line });
|
||||
}
|
||||
|
||||
function parseScript(text, opts) {
|
||||
|
@ -35555,7 +35557,9 @@ function getAst(source) {
|
|||
if (contentType == "text/html") {
|
||||
ast = (0, _parseScriptTags2.default)(source.text, htmlParser) || {};
|
||||
} else if (contentType && contentType.match(/(javascript|jsx)/)) {
|
||||
ast = parse(source.text);
|
||||
const type = source.id.includes("original") ? "original" : "generated";
|
||||
const options = sourceOptions[type];
|
||||
ast = parse(source.text, options);
|
||||
}
|
||||
|
||||
ASTs.set(source.id, ast);
|
||||
|
|
|
@ -16,6 +16,8 @@ function getScopeNodeValue(dbg, index) {
|
|||
}
|
||||
|
||||
add_task(async function() {
|
||||
await pushPref("devtools.debugger.features.map-scopes", true);
|
||||
|
||||
const dbg = await initDebugger("doc-minified2.html");
|
||||
|
||||
await waitForSources(dbg, "sum.js");
|
||||
|
|
|
@ -25,6 +25,7 @@ async function waitForScopeNode(dbg, index) {
|
|||
add_task(async function() {
|
||||
// NOTE: the CORS call makes the test run times inconsistent
|
||||
requestLongerTimeout(2);
|
||||
await pushPref("devtools.debugger.features.map-scopes", true);
|
||||
|
||||
const dbg = await initDebugger("doc-sourcemaps3.html");
|
||||
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
|
||||
|
|
|
@ -48,7 +48,7 @@ pref("devtools.debugger.features.shortcuts", true);
|
|||
pref("devtools.debugger.features.root", false);
|
||||
pref("devtools.debugger.features.column-breakpoints", false);
|
||||
pref("devtools.debugger.features.chrome-scopes", false);
|
||||
pref("devtools.debugger.features.map-scopes", true);
|
||||
pref("devtools.debugger.features.map-scopes", false);
|
||||
pref("devtools.debugger.features.breakpoints-dropdown", true);
|
||||
pref("devtools.debugger.features.remove-command-bar-options", false);
|
||||
pref("devtools.debugger.features.workers", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче