зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3a1d45b3084d (bug 1406551) for leaks and frequently failing new devtools test devtools/client/debugger/new/test/mochitest/browser_dbg-wasm-sourcemaps.js. r=backout
--HG-- extra : amend_source : 36a69b64c05878c1e12c9858bdd658070b41ccf8
This commit is contained in:
Родитель
262c361ad5
Коммит
2b84bdf2ea
|
@ -1,11 +0,0 @@
|
|||
This is the debugger.html project output.
|
||||
See https://github.com/devtools-html/debugger.html
|
||||
|
||||
Taken from upstream commit: 6a34276ba4e2e4f8dfb2123eb4e6795ae658486a
|
||||
|
||||
Packages:
|
||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
||||
- babel-preset-react @6.24.1
|
||||
- react @15.6.2
|
||||
- react-dom @15.6.2
|
||||
- webpack @3.6.0
|
|
@ -412,7 +412,7 @@ body {
|
|||
.modal-wrapper {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
|
@ -423,7 +423,7 @@ body {
|
|||
|
||||
.modal {
|
||||
top: 0;
|
||||
margin: auto;
|
||||
height: 230px;
|
||||
width: 500px;
|
||||
background-color: var(--theme-toolbar-background);
|
||||
transform: translateY(-250px);
|
||||
|
@ -438,7 +438,7 @@ body {
|
|||
|
||||
.modal.entered,
|
||||
.modal.exiting {
|
||||
transform: translateY(0px);
|
||||
transform: translateY(30px);
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
|
@ -490,6 +490,7 @@ body {
|
|||
}
|
||||
|
||||
.shortcuts-modal {
|
||||
height: fit-content;
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
|
@ -972,7 +973,7 @@ html .arrow.expanded svg {
|
|||
width: 15px;
|
||||
height: 15px;
|
||||
margin-right: 5px;
|
||||
vertical-align: sub;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.theme-dark .webpack {
|
||||
|
@ -1427,7 +1428,6 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||
display: flex;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding-top: 11px;
|
||||
}
|
||||
|
||||
.sources-list .managed-tree {
|
||||
|
@ -1462,11 +1462,6 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.sources-list .tree .node .no-arrow {
|
||||
width: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.no-sources-message {
|
||||
font-size: 12px;
|
||||
color: var(--theme-comment-alt);
|
||||
|
@ -1502,7 +1497,7 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||
position: relative;
|
||||
transition: all 0.25s ease;
|
||||
overflow: hidden;
|
||||
padding: 8px 8px 7px 8px;
|
||||
padding: 6.5px;
|
||||
margin-bottom: 0px;
|
||||
margin-top: -1px;
|
||||
cursor: default;
|
||||
|
@ -2358,6 +2353,11 @@ html[dir="rtl"] .arrow svg,
|
|||
--theme-conditional-breakpoint-color: var(--theme-body-color);
|
||||
}
|
||||
|
||||
.paused .CodeMirror-line,
|
||||
.paused .CodeMirror-linenumber {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/**
|
||||
* There's a known codemirror flex issue with chrome that this addresses.
|
||||
* BUG https://github.com/devtools-html/debugger.html/issues/63
|
||||
|
@ -2629,7 +2629,6 @@ html .breakpoints-list .breakpoint.paused {
|
|||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: 1px 0;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.breakpoints-list .pause-indicator {
|
||||
|
@ -3217,26 +3216,12 @@ html .command-bar > button:disabled {
|
|||
offset-inline-start: auto;
|
||||
}
|
||||
|
||||
.welcomebox .small-size-layout {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.welcomebox .normal-layout {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.shortcutKeys {
|
||||
text-align: right;
|
||||
float: left;
|
||||
font-family: Courier;
|
||||
}
|
||||
|
||||
.shortcutKey {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
font-family: Courier;
|
||||
}
|
||||
|
||||
.shortcutFunction {
|
||||
text-align: left;
|
||||
float: left;
|
||||
|
@ -3246,24 +3231,6 @@ html .command-bar > button:disabled {
|
|||
html .welcomebox .toggle-button-end.collapsed {
|
||||
bottom: 1px;
|
||||
}
|
||||
|
||||
@media (max-width: 430px) {
|
||||
.welcomebox .small-size-layout {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.welcomebox .normal-layout {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.shortcutFunction {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.shortcutKey {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.source-header {
|
||||
border-bottom: 1px solid var(--theme-splitter-color);
|
||||
width: 100%;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -70,74 +70,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/******/ __webpack_require__.p = "/assets/build";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1282);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 380);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 1282:
|
||||
/***/ 380:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(1283);
|
||||
module.exports = __webpack_require__(964);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1283:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _prettyFast = __webpack_require__(802);
|
||||
|
||||
var _prettyFast2 = _interopRequireDefault(_prettyFast);
|
||||
|
||||
var _devtoolsUtils = __webpack_require__(900);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var workerHandler = _devtoolsUtils.workerUtils.workerHandler;
|
||||
|
||||
|
||||
function prettyPrint(_ref) {
|
||||
var url = _ref.url,
|
||||
indent = _ref.indent,
|
||||
source = _ref.source;
|
||||
|
||||
var prettified = (0, _prettyFast2.default)(source, {
|
||||
url: url,
|
||||
indent: " ".repeat(indent)
|
||||
});
|
||||
|
||||
return {
|
||||
code: prettified.code,
|
||||
mappings: invertMappings(prettified.map._mappings)
|
||||
};
|
||||
}
|
||||
|
||||
function invertMappings(mappings) {
|
||||
return mappings._array.map(m => {
|
||||
var mapping = {
|
||||
generated: {
|
||||
line: m.originalLine,
|
||||
column: m.originalColumn
|
||||
}
|
||||
};
|
||||
if (m.source) {
|
||||
mapping.source = m.source;
|
||||
mapping.original = {
|
||||
line: m.generatedLine,
|
||||
column: m.generatedColumn
|
||||
};
|
||||
mapping.name = m.name;
|
||||
}
|
||||
return mapping;
|
||||
});
|
||||
}
|
||||
|
||||
self.onmessage = workerHandler({ prettyPrint });
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 381:
|
||||
|
@ -7589,6 +7532,63 @@ module.exports = {
|
|||
streamingWorkerHandler
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 964:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _prettyFast = __webpack_require__(802);
|
||||
|
||||
var _prettyFast2 = _interopRequireDefault(_prettyFast);
|
||||
|
||||
var _devtoolsUtils = __webpack_require__(900);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var workerHandler = _devtoolsUtils.workerUtils.workerHandler;
|
||||
|
||||
|
||||
function prettyPrint(_ref) {
|
||||
var url = _ref.url,
|
||||
indent = _ref.indent,
|
||||
source = _ref.source;
|
||||
|
||||
var prettified = (0, _prettyFast2.default)(source, {
|
||||
url: url,
|
||||
indent: " ".repeat(indent)
|
||||
});
|
||||
|
||||
return {
|
||||
code: prettified.code,
|
||||
mappings: invertMappings(prettified.map._mappings)
|
||||
};
|
||||
}
|
||||
|
||||
function invertMappings(mappings) {
|
||||
return mappings._array.map(m => {
|
||||
var mapping = {
|
||||
generated: {
|
||||
line: m.originalLine,
|
||||
column: m.originalColumn
|
||||
}
|
||||
};
|
||||
if (m.source) {
|
||||
mapping.source = m.source;
|
||||
mapping.original = {
|
||||
line: m.generatedLine,
|
||||
column: m.generatedColumn
|
||||
};
|
||||
mapping.name = m.name;
|
||||
}
|
||||
return mapping;
|
||||
});
|
||||
}
|
||||
|
||||
self.onmessage = workerHandler({ prettyPrint });
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
|
|
|
@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/******/ __webpack_require__.p = "/assets/build";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1284);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 382);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -262,6 +262,168 @@ function arrayMap(array, iteratee) {
|
|||
module.exports = arrayMap;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1123:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _getMatches = __webpack_require__(1173);
|
||||
|
||||
var _getMatches2 = _interopRequireDefault(_getMatches);
|
||||
|
||||
var _projectSearch = __webpack_require__(1140);
|
||||
|
||||
var _devtoolsUtils = __webpack_require__(900);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var workerHandler = _devtoolsUtils.workerUtils.workerHandler;
|
||||
|
||||
|
||||
self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMatches: _projectSearch.findSourceMatches });
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1138:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = buildQuery;
|
||||
|
||||
var _escapeRegExp = __webpack_require__(259);
|
||||
|
||||
var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Ignore doing outline matches for less than 3 whitespaces
|
||||
*
|
||||
* @memberof utils/source-search
|
||||
* @static
|
||||
*/
|
||||
function ignoreWhiteSpace(str) {
|
||||
return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function wholeMatch(query, wholeWord) {
|
||||
if (query === "" || !wholeWord) {
|
||||
return query;
|
||||
}
|
||||
|
||||
return `\\b${query}\\b`;
|
||||
}
|
||||
|
||||
function buildFlags(caseSensitive, isGlobal) {
|
||||
if (caseSensitive && isGlobal) {
|
||||
return "g";
|
||||
}
|
||||
|
||||
if (!caseSensitive && isGlobal) {
|
||||
return "gi";
|
||||
}
|
||||
|
||||
if (!caseSensitive && !isGlobal) {
|
||||
return "i";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function buildQuery(originalQuery, modifiers, _ref) {
|
||||
var _ref$isGlobal = _ref.isGlobal,
|
||||
isGlobal = _ref$isGlobal === undefined ? false : _ref$isGlobal,
|
||||
_ref$ignoreSpaces = _ref.ignoreSpaces,
|
||||
ignoreSpaces = _ref$ignoreSpaces === undefined ? false : _ref$ignoreSpaces;
|
||||
var caseSensitive = modifiers.caseSensitive,
|
||||
regexMatch = modifiers.regexMatch,
|
||||
wholeWord = modifiers.wholeWord;
|
||||
|
||||
|
||||
if (originalQuery === "") {
|
||||
return new RegExp(originalQuery);
|
||||
}
|
||||
|
||||
var query = originalQuery;
|
||||
if (ignoreSpaces) {
|
||||
query = ignoreWhiteSpace(query);
|
||||
}
|
||||
|
||||
if (!regexMatch) {
|
||||
query = (0, _escapeRegExp2.default)(query);
|
||||
}
|
||||
|
||||
query = wholeMatch(query, wholeWord);
|
||||
var flags = buildFlags(caseSensitive, isGlobal);
|
||||
|
||||
if (flags) {
|
||||
return new RegExp(query, flags);
|
||||
}
|
||||
|
||||
return new RegExp(query);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1140:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.findSourceMatches = findSourceMatches;
|
||||
|
||||
var _source = __webpack_require__(233);
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // Maybe reuse file search's functions?
|
||||
|
||||
|
||||
function findSourceMatches(source, queryText) {
|
||||
var _ref;
|
||||
|
||||
var text = source.text;
|
||||
|
||||
if (!(0, _source.isLoaded)(source) || !text || queryText == "") {
|
||||
return [];
|
||||
}
|
||||
|
||||
var lines = text.split("\n");
|
||||
var result = undefined;
|
||||
var query = new RegExp(queryText, "g");
|
||||
|
||||
var matches = lines.map((_text, line) => {
|
||||
var indices = [];
|
||||
|
||||
while (result = query.exec(_text)) {
|
||||
indices.push({
|
||||
sourceId: source.id,
|
||||
line: line + 1,
|
||||
column: result.index,
|
||||
match: result[0],
|
||||
value: _text,
|
||||
text: result.input
|
||||
});
|
||||
}
|
||||
return indices;
|
||||
}).filter(_matches => _matches.length > 0);
|
||||
|
||||
matches = (_ref = []).concat.apply(_ref, _toConsumableArray(matches));
|
||||
return matches;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1165:
|
||||
|
@ -519,6 +681,44 @@ module.exports = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1173:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = getMatches;
|
||||
|
||||
var _buildQuery = __webpack_require__(1138);
|
||||
|
||||
var _buildQuery2 = _interopRequireDefault(_buildQuery);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function getMatches(query, text, modifiers) {
|
||||
if (!query || !text || !modifiers) {
|
||||
return [];
|
||||
}
|
||||
var regexQuery = (0, _buildQuery2.default)(query, modifiers, {
|
||||
isGlobal: true
|
||||
});
|
||||
var matchedLocations = [];
|
||||
var lines = text.split("\n");
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var singleMatch = void 0;
|
||||
var line = lines[i];
|
||||
while ((singleMatch = regexQuery.exec(line)) !== null) {
|
||||
matchedLocations.push({ line: i, ch: singleMatch.index });
|
||||
}
|
||||
}
|
||||
return matchedLocations;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 121:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
|
@ -609,94 +809,6 @@ var isArray = Array.isArray || function (xs) {
|
|||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1211:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = buildQuery;
|
||||
|
||||
var _escapeRegExp = __webpack_require__(259);
|
||||
|
||||
var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Ignore doing outline matches for less than 3 whitespaces
|
||||
*
|
||||
* @memberof utils/source-search
|
||||
* @static
|
||||
*/
|
||||
function ignoreWhiteSpace(str) {
|
||||
return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function wholeMatch(query, wholeWord) {
|
||||
if (query === "" || !wholeWord) {
|
||||
return query;
|
||||
}
|
||||
|
||||
return `\\b${query}\\b`;
|
||||
}
|
||||
|
||||
function buildFlags(caseSensitive, isGlobal) {
|
||||
if (caseSensitive && isGlobal) {
|
||||
return "g";
|
||||
}
|
||||
|
||||
if (!caseSensitive && isGlobal) {
|
||||
return "gi";
|
||||
}
|
||||
|
||||
if (!caseSensitive && !isGlobal) {
|
||||
return "i";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function buildQuery(originalQuery, modifiers, _ref) {
|
||||
var _ref$isGlobal = _ref.isGlobal,
|
||||
isGlobal = _ref$isGlobal === undefined ? false : _ref$isGlobal,
|
||||
_ref$ignoreSpaces = _ref.ignoreSpaces,
|
||||
ignoreSpaces = _ref$ignoreSpaces === undefined ? false : _ref$ignoreSpaces;
|
||||
var caseSensitive = modifiers.caseSensitive,
|
||||
regexMatch = modifiers.regexMatch,
|
||||
wholeWord = modifiers.wholeWord;
|
||||
|
||||
|
||||
if (originalQuery === "") {
|
||||
return new RegExp(originalQuery);
|
||||
}
|
||||
|
||||
var query = originalQuery;
|
||||
if (ignoreSpaces) {
|
||||
query = ignoreWhiteSpace(query);
|
||||
}
|
||||
|
||||
if (!regexMatch) {
|
||||
query = (0, _escapeRegExp2.default)(query);
|
||||
}
|
||||
|
||||
query = wholeMatch(query, wholeWord);
|
||||
var flags = buildFlags(caseSensitive, isGlobal);
|
||||
|
||||
if (flags) {
|
||||
return new RegExp(query, flags);
|
||||
}
|
||||
|
||||
return new RegExp(query);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 122:
|
||||
|
@ -790,126 +902,6 @@ var objectKeys = Object.keys || function (obj) {
|
|||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1284:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(1285);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1285:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _getMatches = __webpack_require__(1286);
|
||||
|
||||
var _getMatches2 = _interopRequireDefault(_getMatches);
|
||||
|
||||
var _projectSearch = __webpack_require__(1287);
|
||||
|
||||
var _devtoolsUtils = __webpack_require__(900);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var workerHandler = _devtoolsUtils.workerUtils.workerHandler;
|
||||
|
||||
|
||||
self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMatches: _projectSearch.findSourceMatches });
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1286:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = getMatches;
|
||||
|
||||
var _buildQuery = __webpack_require__(1211);
|
||||
|
||||
var _buildQuery2 = _interopRequireDefault(_buildQuery);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function getMatches(query, text, modifiers) {
|
||||
if (!query || !text || !modifiers) {
|
||||
return [];
|
||||
}
|
||||
var regexQuery = (0, _buildQuery2.default)(query, modifiers, {
|
||||
isGlobal: true
|
||||
});
|
||||
var matchedLocations = [];
|
||||
var lines = text.split("\n");
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var singleMatch = void 0;
|
||||
var line = lines[i];
|
||||
while ((singleMatch = regexQuery.exec(line)) !== null) {
|
||||
matchedLocations.push({ line: i, ch: singleMatch.index });
|
||||
}
|
||||
}
|
||||
return matchedLocations;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1287:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.findSourceMatches = findSourceMatches;
|
||||
|
||||
var _source = __webpack_require__(233);
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // Maybe reuse file search's functions?
|
||||
|
||||
|
||||
function findSourceMatches(source, queryText) {
|
||||
var _ref;
|
||||
|
||||
var text = source.text;
|
||||
|
||||
if (!(0, _source.isLoaded)(source) || !text || queryText == "") {
|
||||
return [];
|
||||
}
|
||||
|
||||
var lines = text.split("\n");
|
||||
var result = undefined;
|
||||
var query = new RegExp(queryText, "g");
|
||||
|
||||
var matches = lines.map((_text, line) => {
|
||||
var indices = [];
|
||||
|
||||
while (result = query.exec(_text)) {
|
||||
indices.push({
|
||||
sourceId: source.id,
|
||||
line: line + 1,
|
||||
column: result.index,
|
||||
match: result[0],
|
||||
value: _text,
|
||||
text: result.input
|
||||
});
|
||||
}
|
||||
return indices;
|
||||
}).filter(_matches => _matches.length > 0);
|
||||
|
||||
matches = (_ref = []).concat.apply(_ref, _toConsumableArray(matches));
|
||||
return matches;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14:
|
||||
|
@ -957,7 +949,7 @@ module.exports = isObjectLike;
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isLoaded = exports.getMode = exports.getSourceLineCount = exports.getSourcePath = exports.getFileURL = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.shouldPrettyPrint = exports.isThirdParty = exports.isPretty = exports.isJavaScript = undefined;
|
||||
exports.isLoaded = exports.getMode = exports.getSourceLineCount = exports.getSourcePath = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.shouldPrettyPrint = exports.isThirdParty = exports.isPretty = exports.isJavaScript = undefined;
|
||||
|
||||
var _devtoolsSourceMap = __webpack_require__(898);
|
||||
|
||||
|
@ -1056,21 +1048,10 @@ function getRawSourceURL(url) {
|
|||
return url.replace(/:formatted$/, "");
|
||||
}
|
||||
|
||||
function resolveFileURL(url) {
|
||||
var transformUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : initialUrl => initialUrl;
|
||||
|
||||
url = getRawSourceURL(url || "");
|
||||
var name = transformUrl(url);
|
||||
return (0, _utils.endTruncateStr)(name, 50);
|
||||
}
|
||||
|
||||
function getFilenameFromURL(url) {
|
||||
return resolveFileURL(url, initialUrl => (0, _path.basename)(initialUrl) || "(index)");
|
||||
}
|
||||
|
||||
function getFormattedSourceId(id) {
|
||||
var sourceId = id.split("/")[1];
|
||||
return `SOURCE${sourceId}`;
|
||||
url = getRawSourceURL(url || "");
|
||||
var name = (0, _path.basename)(url) || "(index)";
|
||||
return (0, _utils.endTruncateStr)(name, 50);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1085,30 +1066,13 @@ function getFilename(source) {
|
|||
id = source.id;
|
||||
|
||||
if (!url) {
|
||||
return getFormattedSourceId(id);
|
||||
var sourceId = id.split("/")[1];
|
||||
return `SOURCE${sourceId}`;
|
||||
}
|
||||
|
||||
return getFilenameFromURL(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a source url.
|
||||
* If the source does not have a url, use the source id.
|
||||
*
|
||||
* @memberof utils/source
|
||||
* @static
|
||||
*/
|
||||
function getFileURL(source) {
|
||||
var url = source.url,
|
||||
id = source.id;
|
||||
|
||||
if (!url) {
|
||||
return getFormattedSourceId(id);
|
||||
}
|
||||
|
||||
return resolveFileURL(url);
|
||||
}
|
||||
|
||||
var contentTypeModeMap = {
|
||||
"text/javascript": { name: "javascript" },
|
||||
"text/typescript": { name: "javascript", typescript: true },
|
||||
|
@ -1220,7 +1184,6 @@ exports.getPrettySourceURL = getPrettySourceURL;
|
|||
exports.getRawSourceURL = getRawSourceURL;
|
||||
exports.getFilename = getFilename;
|
||||
exports.getFilenameFromURL = getFilenameFromURL;
|
||||
exports.getFileURL = getFileURL;
|
||||
exports.getSourcePath = getSourcePath;
|
||||
exports.getSourceLineCount = getSourceLineCount;
|
||||
exports.getMode = getMode;
|
||||
|
@ -2500,6 +2463,14 @@ module.exports = {
|
|||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 382:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(1123);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6:
|
||||
|
|
|
@ -19,9 +19,6 @@ support-files =
|
|||
examples/sum/sum.js
|
||||
examples/sum/sum.min.js
|
||||
examples/sum/sum.min.js.map
|
||||
examples/reload/code_reload_1.js
|
||||
examples/reload/code_reload_2.js
|
||||
examples/reload/doc_reload.html
|
||||
examples/doc-async.html
|
||||
examples/doc-asm.html
|
||||
examples/doc-scripts.html
|
||||
|
@ -56,7 +53,6 @@ support-files =
|
|||
examples/script-switching-02.js
|
||||
examples/script-switching-01.js
|
||||
examples/times2.js
|
||||
examples/reload/sjs_code_reload.sjs
|
||||
|
||||
[browser_dbg-asm.js]
|
||||
[browser_dbg-async-stepping.js]
|
||||
|
@ -68,6 +64,7 @@ support-files =
|
|||
skip-if = true # Bug 1383576
|
||||
[browser_dbg-breakpoints-cond.js]
|
||||
[browser_dbg-call-stack.js]
|
||||
[browser_dbg-expressions.js]
|
||||
[browser_dbg-scopes.js]
|
||||
[browser_dbg-chrome-create.js]
|
||||
[browser_dbg-chrome-debugging.js]
|
||||
|
@ -77,8 +74,6 @@ skip-if = debug # bug 1374187
|
|||
[browser_dbg-editor-gutter.js]
|
||||
[browser_dbg-editor-select.js]
|
||||
[browser_dbg-editor-highlight.js]
|
||||
[browser_dbg-expressions.js]
|
||||
[browser_dbg-expressions-error.js]
|
||||
[browser_dbg-iframes.js]
|
||||
[browser_dbg_keyboard_navigation.js]
|
||||
[browser_dbg_keyboard-shortcuts.js]
|
||||
|
@ -107,4 +102,4 @@ skip-if = true # Bug 1393121, 1393299
|
|||
[browser_dbg-tabs.js]
|
||||
[browser_dbg-toggling-tools.js]
|
||||
[browser_dbg-wasm-sourcemaps.js]
|
||||
[browser_dbg-reload.js]
|
||||
skip-if = true
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* test pausing on an errored watch expression
|
||||
* assert that you can:
|
||||
* 1. resume
|
||||
* 2. still evalutate expressions
|
||||
* 3. expand properties
|
||||
*/
|
||||
|
||||
const expressionSelectors = {
|
||||
input: "input.input-expression"
|
||||
};
|
||||
|
||||
function getLabel(dbg, index) {
|
||||
return findElement(dbg, "expressionNode", index).innerText;
|
||||
}
|
||||
|
||||
function getValue(dbg, index) {
|
||||
return findElement(dbg, "expressionValue", index).innerText;
|
||||
}
|
||||
|
||||
function assertEmptyValue(dbg, index) {
|
||||
const value = findElement(dbg, "expressionValue", index);
|
||||
if (value) {
|
||||
is(value.innerText, "");
|
||||
return;
|
||||
}
|
||||
|
||||
is(value, null);
|
||||
}
|
||||
|
||||
function toggleExpression(dbg, index) {
|
||||
findElement(dbg, "expressionNode", index).click();
|
||||
}
|
||||
|
||||
async function addExpression(dbg, input) {
|
||||
info("Adding an expression");
|
||||
findElementWithSelector(dbg, expressionSelectors.input).focus();
|
||||
type(dbg, input);
|
||||
pressKey(dbg, "Enter");
|
||||
|
||||
await waitForDispatch(dbg, "EVALUATE_EXPRESSION");
|
||||
}
|
||||
|
||||
async function editExpression(dbg, input) {
|
||||
info("updating the expression");
|
||||
dblClickElement(dbg, "expressionNode", 1);
|
||||
// Position cursor reliably at the end of the text.
|
||||
pressKey(dbg, "End");
|
||||
type(dbg, input);
|
||||
pressKey(dbg, "Enter");
|
||||
await waitForDispatch(dbg, "EVALUATE_EXPRESSION");
|
||||
}
|
||||
|
||||
/*
|
||||
* When we add a bad expression, we'll pause,
|
||||
* resume, and wait for the expression to finish being evaluated.
|
||||
*/
|
||||
async function addBadExpression(dbg, input) {
|
||||
const paused = waitForPaused(dbg);
|
||||
const added = addExpression(dbg, input);
|
||||
|
||||
await paused;
|
||||
ok(dbg.selectors.isEvaluatingExpression(dbg.getState()));
|
||||
await resume(dbg);
|
||||
await added;
|
||||
}
|
||||
|
||||
add_task(async function() {
|
||||
const dbg = await initDebugger("doc-script-switching.html");
|
||||
|
||||
await togglePauseOnExceptions(dbg, true, false);
|
||||
|
||||
// add a good expression, 2 bad expressions, and another good one
|
||||
await addExpression(dbg, "location");
|
||||
await addBadExpression(dbg, "foo.bar");
|
||||
await addBadExpression(dbg, "foo.batt");
|
||||
await addExpression(dbg, "2");
|
||||
|
||||
// check the value of
|
||||
is(getValue(dbg, 2), "(unavailable)")
|
||||
is(getValue(dbg, 3), "(unavailable)")
|
||||
is(getValue(dbg, 4), 2);
|
||||
|
||||
toggleExpression(dbg, 1);
|
||||
await waitForDispatch(dbg, "LOAD_OBJECT_PROPERTIES");
|
||||
is(findAllElements(dbg, "expressionNodes").length, 20);
|
||||
});
|
|
@ -1,29 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/*
|
||||
* Test reloading:
|
||||
* 1. reload the source
|
||||
* 2. re-sync breakpoints
|
||||
*/
|
||||
|
||||
add_task(async function() {
|
||||
const dbg = await initDebugger("reload/doc_reload.html", "sjs_code_reload");
|
||||
|
||||
const sym = waitForDispatch(dbg, "SET_SYMBOLS");
|
||||
await selectSource(dbg, "sjs_code_reload");
|
||||
await sym;
|
||||
|
||||
await addBreakpoint(dbg, "sjs_code_reload", 2);
|
||||
|
||||
const sync = waitForDispatch(dbg, "SYNC_BREAKPOINT");
|
||||
await reload(dbg, "sjs_code_reload");
|
||||
await sync;
|
||||
|
||||
const breakpoints = dbg.selectors.getBreakpoints(dbg.getState());
|
||||
const breakpointList = breakpoints.valueSeq().toJS();
|
||||
const breakpoint = breakpointList[0];
|
||||
|
||||
is(breakpointList.length, 1);
|
||||
is(breakpoint.location.line, 6);
|
||||
});
|
|
@ -11,7 +11,6 @@ add_task(async function() {
|
|||
await waitForPaused(dbg);
|
||||
assertPausedLocation(dbg);
|
||||
|
||||
await waitForSource(dbg, "wasm-sourcemaps/average.c");
|
||||
await addBreakpoint(dbg, "wasm-sourcemaps/average.c", 12);
|
||||
|
||||
clickElement(dbg, "resume");
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
function foo(n) {
|
||||
console.log("yo")
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
/*
|
||||
* comments
|
||||
*/
|
||||
|
||||
function foo() {
|
||||
console.log("YO")
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<!doctype html>
|
||||
|
||||
<html>
|
||||
<script src="sjs_code_reload.sjs"></script>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Empty test page 1</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,32 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* globals getState, setState */
|
||||
/* exported handleRequest */
|
||||
|
||||
"use strict";
|
||||
|
||||
function _getUrl(request, counter) {
|
||||
const { scheme, host, path } = request;
|
||||
|
||||
const newPath = path.substr(0, path.lastIndexOf("/") + 1);
|
||||
const index = counter < 3 ? 1 : 2;
|
||||
return `${scheme}://${host}${newPath}/code_reload_${index}.js`
|
||||
}
|
||||
|
||||
function handleRequest(request, response) {
|
||||
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Access-Control-Allow-Origin", "*", false);
|
||||
response.setHeader("Content-Type", "text/javascript", false);
|
||||
|
||||
// Redirect to a different file each time.
|
||||
let counter = 1 + +getState("counter");
|
||||
|
||||
const newUrl = _getUrl(request, counter);
|
||||
|
||||
response.setStatusLine(request.httpVersion, 302, "Found");
|
||||
response.setHeader("Location", newUrl);
|
||||
setState("counter", "" + counter);
|
||||
}
|
|
@ -504,7 +504,7 @@ function stepOut(dbg) {
|
|||
function resume(dbg) {
|
||||
info("Resuming");
|
||||
dbg.actions.resume();
|
||||
return waitForState(dbg, (state) => !dbg.selectors.isPaused(state));
|
||||
return waitForThreadEvents(dbg, "resumed");
|
||||
}
|
||||
|
||||
function deleteExpression(dbg, input) {
|
||||
|
|
|
@ -790,7 +790,3 @@ shortcuts.projectSearch=Full Project Search
|
|||
# LOCALIZATION NOTE (shortcuts.functionSearch): text describing
|
||||
# keyboard shortcut action for function search
|
||||
shortcuts.functionSearch=Function Search
|
||||
|
||||
# LOCALIZATION NOTE (shortcuts.buttonName): text describing
|
||||
# keyboard shortcut button text
|
||||
shortcuts.buttonName=Keyboard shortcuts
|
||||
|
|
|
@ -31,6 +31,7 @@ pref("devtools.debugger.ui.variables-only-enum-visible", false);
|
|||
pref("devtools.debugger.ui.variables-searchbox-visible", false);
|
||||
pref("devtools.debugger.ui.framework-grouping-on", true);
|
||||
pref("devtools.debugger.call-stack-visible", false);
|
||||
pref("devtools.debugger.scopes-visible", false);
|
||||
pref("devtools.debugger.start-panel-collapsed", false);
|
||||
pref("devtools.debugger.end-panel-collapsed", false);
|
||||
pref("devtools.debugger.tabs", "[]");
|
||||
|
|
Загрузка…
Ссылка в новой задаче