зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1457517 - Update Debugger Frontend v46. r=jdescottes
This commit is contained in:
Родитель
92651e3581
Коммит
db0ca01e42
|
@ -1,12 +1,12 @@
|
|||
This is the debugger.html project output.
|
||||
See https://github.com/devtools-html/debugger.html
|
||||
|
||||
Version 45.1
|
||||
Version 46
|
||||
|
||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-45...release-45.1
|
||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-45.1...release-46
|
||||
|
||||
Packages:
|
||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.2
|
||||
- babel-preset-react @6.24.1
|
||||
- react @16.2.0
|
||||
- react-dom @16.2.0
|
||||
|
|
|
@ -1965,18 +1965,6 @@ html .toggle-button.end.vertical svg {
|
|||
--comment-node-color: var(--theme-comment);
|
||||
}
|
||||
|
||||
.theme-firebug {
|
||||
--number-color: #000088;
|
||||
--string-color: #FF0000;
|
||||
--null-color: #787878;
|
||||
--object-color: DarkGreen;
|
||||
--caption-color: #444444;
|
||||
--location-color: #555555;
|
||||
--source-link-color: blue;
|
||||
--node-color: rgb(0, 0, 136);
|
||||
--reference-color: rgb(102, 102, 255);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
.inline {
|
||||
|
@ -2012,7 +2000,8 @@ html .toggle-button.end.vertical svg {
|
|||
color: var(--string-color);
|
||||
}
|
||||
|
||||
.objectBox-string a, .objectBox-string a:visited {
|
||||
.objectBox-string a,
|
||||
.objectBox-string a:visited {
|
||||
color: currentColor;
|
||||
text-decoration: none;
|
||||
font-style: italic;
|
||||
|
@ -2205,7 +2194,7 @@ button.open-inspector {
|
|||
display: inline-block;
|
||||
background-color: var(--comment-node-color);
|
||||
height: 16px;
|
||||
margin-left: .25em;
|
||||
margin-left: 0.25em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
@ -2223,7 +2212,7 @@ button.jump-definition {
|
|||
display: inline-block;
|
||||
background-color: var(--comment-node-color);
|
||||
height: 16px;
|
||||
margin-left: .25em;
|
||||
margin-left: 0.25em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
@ -2278,6 +2267,16 @@ button.jump-definition {
|
|||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Focused styles */
|
||||
.tree.object-inspector .tree-node.focused * {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.tree-node.focused button.jump-definition,
|
||||
.tree-node.focused button.open-inspector {
|
||||
background-color: currentColor;
|
||||
}
|
||||
/* 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/>. */
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -12,10 +12,13 @@ add_task(async function() {
|
|||
await waitForPaused(dbg);
|
||||
await waitForLoadedSource(dbg, "switching-02");
|
||||
|
||||
// MAP_FRAMES triggers a new Scopes panel render cycle, which introduces
|
||||
// a race condition with the click event on the foo node.
|
||||
await waitForDispatch(dbg, "MAP_FRAMES");
|
||||
|
||||
is(getLabel(dbg, 1), "secondCall");
|
||||
is(getLabel(dbg, 2), "<this>");
|
||||
is(getLabel(dbg, 4), "foo()");
|
||||
|
||||
await toggleScopeNode(dbg, 4);
|
||||
is(getLabel(dbg, 5), "arguments");
|
||||
|
||||
|
|
|
@ -56,6 +56,5 @@ add_task(async function() {
|
|||
|
||||
// selecting another source keeps search open
|
||||
await selectSource(dbg, "simple2");
|
||||
pressKey(dbg, "Enter");
|
||||
is(state.posFrom.line, 0);
|
||||
ok(findElement(dbg, "searchField"), "Search field is still visible");
|
||||
});
|
||||
|
|
|
@ -1073,7 +1073,8 @@ const selectors = {
|
|||
outlineItem: i =>
|
||||
`.outline-list__element:nth-child(${i}) .function-signature`,
|
||||
outlineItems: ".outline-list__element",
|
||||
conditionalPanelInput: ".conditional-breakpoint-panel input"
|
||||
conditionalPanelInput: ".conditional-breakpoint-panel input",
|
||||
searchField: ".search-field",
|
||||
};
|
||||
|
||||
function getSelector(elementName, ...args) {
|
||||
|
|
|
@ -1,3 +1,87 @@
|
|||
/* 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/. */
|
||||
|
||||
.tree {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.tree.inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tree.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tree.noselect {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tree .tree-node {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tree .tree-node:not(.focused):hover {
|
||||
background-color: var(--theme-selection-background-hover);
|
||||
}
|
||||
|
||||
.tree-indent {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
margin-inline-start: 5px;
|
||||
border-inline-start: 1px solid #A2D1FF;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Align with expandables siblings (where we have the arrow) */
|
||||
.tree-node[data-expandable="false"] .tree-indent:last-of-type {
|
||||
margin-inline-end: 15px;
|
||||
}
|
||||
|
||||
/* For non expandable root nodes, we don't have .tree-indent elements, so we declare
|
||||
the margin on the start of the node */
|
||||
.tree-node[data-expandable="false"][aria-level="1"] {
|
||||
padding-inline-start: 15px
|
||||
}
|
||||
|
||||
.tree .tree-node[data-expandable="true"] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.tree-node img.arrow {
|
||||
mask: url("chrome://devtools/skin/images/devtools-components/arrow.svg") no-repeat;
|
||||
mask-size: 100%;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
margin-inline-start: 1px;
|
||||
margin-inline-end: 4px;
|
||||
background-color: var(--theme-splitter-color, #9B9B9B);
|
||||
transform: rotate(-90deg);
|
||||
transition: transform 0.125s ease;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
html[dir="rtl"] .tree-node img.arrow {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.tree-node img.arrow.expanded.expanded {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.tree .tree-node.focused {
|
||||
color: white;
|
||||
background-color: var(--theme-selection-background, #0a84ff);
|
||||
}
|
||||
|
||||
.tree-node.focused img.arrow {
|
||||
background-color: currentColor;
|
||||
}
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* 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
|
||||
|
@ -52,7 +136,8 @@
|
|||
color: var(--string-color);
|
||||
}
|
||||
|
||||
.objectBox-string a, .objectBox-string a:visited {
|
||||
.objectBox-string a,
|
||||
.objectBox-string a:visited {
|
||||
color: currentColor;
|
||||
text-decoration: none;
|
||||
font-style: italic;
|
||||
|
@ -78,6 +163,12 @@
|
|||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.objectBox-stackTrace-fn::before {
|
||||
content: "\3BB"; /* The "lambda" symbol */
|
||||
display: inline-block;
|
||||
margin: 0 0.3em;
|
||||
}
|
||||
|
||||
.objectBox-stackTrace-fn {
|
||||
color: var(--console-output-color);
|
||||
padding-inline-start: 17px;
|
||||
|
@ -239,7 +330,7 @@ button.open-inspector {
|
|||
display: inline-block;
|
||||
background-color: var(--comment-node-color);
|
||||
height: 16px;
|
||||
margin-left: .25em;
|
||||
margin-left: 0.25em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
@ -257,7 +348,7 @@ button.jump-definition {
|
|||
display: inline-block;
|
||||
background-color: var(--comment-node-color);
|
||||
height: 16px;
|
||||
margin-left: .25em;
|
||||
margin-left: 0.25em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
@ -274,90 +365,6 @@ button.jump-definition {
|
|||
* 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/. */
|
||||
|
||||
.tree {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.tree.inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tree.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tree.noselect {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tree .tree-node {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tree .tree-node:not(.focused):hover {
|
||||
background-color: var(--theme-selection-background-hover);
|
||||
}
|
||||
|
||||
.tree-indent {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
margin-inline-start: 5px;
|
||||
border-inline-start: 1px solid #A2D1FF;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Align with expandables siblings (where we have the arrow) */
|
||||
.tree-node[data-expandable="false"] .tree-indent:last-of-type {
|
||||
margin-inline-end: 15px;
|
||||
}
|
||||
|
||||
/* For non expandable root nodes, we don't have .tree-indent elements, so we declare
|
||||
the margin on the start of the node */
|
||||
.tree-node[data-expandable="false"][aria-level="1"] {
|
||||
padding-inline-start: 15px
|
||||
}
|
||||
|
||||
.tree .tree-node[data-expandable="true"] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.tree-node img.arrow {
|
||||
mask: url("chrome://devtools/skin/images/devtools-components/arrow.svg") no-repeat;
|
||||
mask-size: 100%;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
margin-inline-start: 1px;
|
||||
margin-inline-end: 4px;
|
||||
background-color: var(--theme-splitter-color, #9B9B9B);
|
||||
transform: rotate(-90deg);
|
||||
transition: transform 0.125s ease;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
html[dir="rtl"] .tree-node img.arrow {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.tree-node img.arrow.expanded.expanded {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.tree .tree-node.focused {
|
||||
color: white;
|
||||
background-color: var(--theme-selection-background, #0a84ff);
|
||||
}
|
||||
|
||||
.tree-node.focused img.arrow {
|
||||
background-color: currentColor;
|
||||
}
|
||||
/* 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/. */
|
||||
|
||||
.tree.object-inspector .node.object-node {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -7,7 +7,7 @@
|
|||
var a = factory();
|
||||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
||||
}
|
||||
})(this, function() {
|
||||
})(typeof self !== 'undefined' ? self : this, function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
@ -67,158 +67,22 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/ __webpack_require__.p = "/assets/build";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 15);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 3646);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
/******/ ({
|
||||
|
||||
var charenc = {
|
||||
// UTF-8 encoding
|
||||
utf8: {
|
||||
// Convert a string to a byte array
|
||||
stringToBytes: function(str) {
|
||||
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
|
||||
},
|
||||
|
||||
// Convert a byte array to a string
|
||||
bytesToString: function(bytes) {
|
||||
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
|
||||
}
|
||||
},
|
||||
|
||||
// Binary encoding
|
||||
bin: {
|
||||
// Convert a string to a byte array
|
||||
stringToBytes: function(str) {
|
||||
for (var bytes = [], i = 0; i < str.length; i++)
|
||||
bytes.push(str.charCodeAt(i) & 0xFF);
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a string
|
||||
bytesToString: function(bytes) {
|
||||
for (var str = [], i = 0; i < bytes.length; i++)
|
||||
str.push(String.fromCharCode(bytes[i]));
|
||||
return str.join('');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = charenc;
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* 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 networkRequest = __webpack_require__(7);
|
||||
const workerUtils = __webpack_require__(8);
|
||||
|
||||
module.exports = {
|
||||
networkRequest,
|
||||
workerUtils
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 2 */,
|
||||
/* 3 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* 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 md5 = __webpack_require__(4);
|
||||
|
||||
function originalToGeneratedId(originalId) {
|
||||
const match = originalId.match(/(.*)\/originalSource/);
|
||||
return match ? match[1] : "";
|
||||
}
|
||||
|
||||
function generatedToOriginalId(generatedId, url) {
|
||||
return `${generatedId}/originalSource-${md5(url)}`;
|
||||
}
|
||||
|
||||
function isOriginalId(id) {
|
||||
return !!id.match(/\/originalSource/);
|
||||
}
|
||||
|
||||
function isGeneratedId(id) {
|
||||
return !isOriginalId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims the query part or reference identifier of a URL string, if necessary.
|
||||
*/
|
||||
function trimUrlQuery(url) {
|
||||
let length = url.length;
|
||||
let q1 = url.indexOf("?");
|
||||
let q2 = url.indexOf("&");
|
||||
let q3 = url.indexOf("#");
|
||||
let q = Math.min(q1 != -1 ? q1 : length, q2 != -1 ? q2 : length, q3 != -1 ? q3 : length);
|
||||
|
||||
return url.slice(0, q);
|
||||
}
|
||||
|
||||
// Map suffix to content type.
|
||||
const contentMap = {
|
||||
"js": "text/javascript",
|
||||
"jsm": "text/javascript",
|
||||
"mjs": "text/javascript",
|
||||
"ts": "text/typescript",
|
||||
"tsx": "text/typescript-jsx",
|
||||
"jsx": "text/jsx",
|
||||
"coffee": "text/coffeescript",
|
||||
"elm": "text/elm",
|
||||
"cljs": "text/x-clojure"
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the content type for the specified URL. If no specific
|
||||
* content type can be determined, "text/plain" is returned.
|
||||
*
|
||||
* @return String
|
||||
* The content type.
|
||||
*/
|
||||
function getContentType(url) {
|
||||
url = trimUrlQuery(url);
|
||||
let dot = url.lastIndexOf(".");
|
||||
if (dot >= 0) {
|
||||
let name = url.substring(dot + 1);
|
||||
if (name in contentMap) {
|
||||
return contentMap[name];
|
||||
}
|
||||
}
|
||||
return "text/plain";
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
originalToGeneratedId,
|
||||
generatedToOriginalId,
|
||||
isOriginalId,
|
||||
isGeneratedId,
|
||||
getContentType,
|
||||
contentMapForTesting: contentMap
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ 248:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
(function(){
|
||||
var crypt = __webpack_require__(5),
|
||||
utf8 = __webpack_require__(0).utf8,
|
||||
isBuffer = __webpack_require__(6),
|
||||
bin = __webpack_require__(0).bin,
|
||||
var crypt = __webpack_require__(249),
|
||||
utf8 = __webpack_require__(250).utf8,
|
||||
isBuffer = __webpack_require__(251),
|
||||
bin = __webpack_require__(250).bin,
|
||||
|
||||
// The core
|
||||
md5 = function (message, options) {
|
||||
|
@ -377,7 +241,8 @@ module.exports = {
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
|
||||
/***/ 249:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() {
|
||||
|
@ -479,13 +344,54 @@ module.exports = {
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
|
||||
/***/ 250:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var charenc = {
|
||||
// UTF-8 encoding
|
||||
utf8: {
|
||||
// Convert a string to a byte array
|
||||
stringToBytes: function(str) {
|
||||
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
|
||||
},
|
||||
|
||||
// Convert a byte array to a string
|
||||
bytesToString: function(bytes) {
|
||||
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
|
||||
}
|
||||
},
|
||||
|
||||
// Binary encoding
|
||||
bin: {
|
||||
// Convert a string to a byte array
|
||||
stringToBytes: function(str) {
|
||||
for (var bytes = [], i = 0; i < str.length; i++)
|
||||
bytes.push(str.charCodeAt(i) & 0xFF);
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a string
|
||||
bytesToString: function(bytes) {
|
||||
for (var str = [], i = 0; i < bytes.length; i++)
|
||||
str.push(String.fromCharCode(bytes[i]));
|
||||
return str.join('');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = charenc;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 251:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
|
@ -506,13 +412,177 @@ function isSlowBuffer (obj) {
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/***/ 3646:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
/* 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 {
|
||||
originalToGeneratedId,
|
||||
generatedToOriginalId,
|
||||
isGeneratedId,
|
||||
isOriginalId
|
||||
} = __webpack_require__(3652);
|
||||
|
||||
const {
|
||||
workerUtils: { WorkerDispatcher }
|
||||
} = __webpack_require__(3651);
|
||||
|
||||
const dispatcher = new WorkerDispatcher();
|
||||
|
||||
const getOriginalURLs = dispatcher.task("getOriginalURLs");
|
||||
const getGeneratedRanges = dispatcher.task("getGeneratedRanges", {
|
||||
queue: true
|
||||
});
|
||||
const getGeneratedLocation = dispatcher.task("getGeneratedLocation", {
|
||||
queue: true
|
||||
});
|
||||
const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
|
||||
queue: true
|
||||
});
|
||||
const getOriginalLocation = dispatcher.task("getOriginalLocation");
|
||||
const getLocationScopes = dispatcher.task("getLocationScopes");
|
||||
const getOriginalSourceText = dispatcher.task("getOriginalSourceText");
|
||||
const applySourceMap = dispatcher.task("applySourceMap");
|
||||
const clearSourceMaps = dispatcher.task("clearSourceMaps");
|
||||
const hasMappedSource = dispatcher.task("hasMappedSource");
|
||||
|
||||
module.exports = {
|
||||
originalToGeneratedId,
|
||||
generatedToOriginalId,
|
||||
isGeneratedId,
|
||||
isOriginalId,
|
||||
hasMappedSource,
|
||||
getOriginalURLs,
|
||||
getGeneratedRanges,
|
||||
getGeneratedLocation,
|
||||
getAllGeneratedLocations,
|
||||
getOriginalLocation,
|
||||
getLocationScopes,
|
||||
getOriginalSourceText,
|
||||
applySourceMap,
|
||||
clearSourceMaps,
|
||||
startSourceMapWorker: dispatcher.start.bind(dispatcher),
|
||||
stopSourceMapWorker: dispatcher.stop.bind(dispatcher)
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3651:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* 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 networkRequest = __webpack_require__(3653);
|
||||
const workerUtils = __webpack_require__(3654);
|
||||
|
||||
module.exports = {
|
||||
networkRequest,
|
||||
workerUtils
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3652:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
/* 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 md5 = __webpack_require__(248);
|
||||
|
||||
function originalToGeneratedId(originalId) {
|
||||
const match = originalId.match(/(.*)\/originalSource/);
|
||||
return match ? match[1] : "";
|
||||
}
|
||||
|
||||
function generatedToOriginalId(generatedId, url) {
|
||||
return `${generatedId}/originalSource-${md5(url)}`;
|
||||
}
|
||||
|
||||
function isOriginalId(id) {
|
||||
return !!id.match(/\/originalSource/);
|
||||
}
|
||||
|
||||
function isGeneratedId(id) {
|
||||
return !isOriginalId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims the query part or reference identifier of a URL string, if necessary.
|
||||
*/
|
||||
function trimUrlQuery(url) {
|
||||
const length = url.length;
|
||||
const q1 = url.indexOf("?");
|
||||
const q2 = url.indexOf("&");
|
||||
const q3 = url.indexOf("#");
|
||||
const q = Math.min(q1 != -1 ? q1 : length, q2 != -1 ? q2 : length, q3 != -1 ? q3 : length);
|
||||
|
||||
return url.slice(0, q);
|
||||
}
|
||||
|
||||
// Map suffix to content type.
|
||||
const contentMap = {
|
||||
js: "text/javascript",
|
||||
jsm: "text/javascript",
|
||||
mjs: "text/javascript",
|
||||
ts: "text/typescript",
|
||||
tsx: "text/typescript-jsx",
|
||||
jsx: "text/jsx",
|
||||
coffee: "text/coffeescript",
|
||||
elm: "text/elm",
|
||||
cljs: "text/x-clojure"
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the content type for the specified URL. If no specific
|
||||
* content type can be determined, "text/plain" is returned.
|
||||
*
|
||||
* @return String
|
||||
* The content type.
|
||||
*/
|
||||
function getContentType(url) {
|
||||
url = trimUrlQuery(url);
|
||||
const dot = url.lastIndexOf(".");
|
||||
if (dot >= 0) {
|
||||
const name = url.substring(dot + 1);
|
||||
if (name in contentMap) {
|
||||
return contentMap[name];
|
||||
}
|
||||
}
|
||||
return "text/plain";
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
originalToGeneratedId,
|
||||
generatedToOriginalId,
|
||||
isOriginalId,
|
||||
isGeneratedId,
|
||||
getContentType,
|
||||
contentMapForTesting: contentMap
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3653:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* 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/>. */
|
||||
|
||||
function networkRequest(url, opts) {
|
||||
return fetch(url, {
|
||||
cache: opts.loadFromCache ? "default" : "no-cache"
|
||||
|
@ -527,7 +597,8 @@ function networkRequest(url, opts) {
|
|||
module.exports = networkRequest;
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
|
||||
/***/ 3654:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
||||
|
@ -537,7 +608,7 @@ function WorkerDispatcher() {
|
|||
this.worker = null;
|
||||
} /* 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/. */
|
||||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
WorkerDispatcher.prototype = {
|
||||
start(url) {
|
||||
|
@ -577,7 +648,11 @@ WorkerDispatcher.prototype = {
|
|||
calls.length = 0;
|
||||
|
||||
const id = this.msgId++;
|
||||
this.worker.postMessage({ id, method, calls: items.map(item => item[0]) });
|
||||
this.worker.postMessage({
|
||||
id,
|
||||
method,
|
||||
calls: items.map(item => item[0])
|
||||
});
|
||||
|
||||
const listener = ({ data: result }) => {
|
||||
if (result.id !== id) {
|
||||
|
@ -620,9 +695,8 @@ function workerHandler(publicInterface) {
|
|||
// Error can't be sent via postMessage, so be sure to
|
||||
// convert to string.
|
||||
err => ({ error: err.toString() }));
|
||||
} else {
|
||||
return { response };
|
||||
}
|
||||
return { response };
|
||||
} catch (error) {
|
||||
// Error can't be sent via postMessage, so be sure to convert to
|
||||
// string.
|
||||
|
@ -639,7 +713,7 @@ function streamingWorkerHandler(publicInterface, { timeout = 100 } = {}, worker
|
|||
var _ref = _asyncToGenerator(function* (id, tasks) {
|
||||
let isWorking = true;
|
||||
|
||||
const intervalId = setTimeout(function () {
|
||||
const timeoutId = setTimeout(function () {
|
||||
isWorking = false;
|
||||
}, timeout);
|
||||
|
||||
|
@ -650,7 +724,7 @@ function streamingWorkerHandler(publicInterface, { timeout = 100 } = {}, worker
|
|||
results.push(result);
|
||||
}
|
||||
worker.postMessage({ id, status: "pending", data: results });
|
||||
clearInterval(intervalId);
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
if (tasks.length !== 0) {
|
||||
yield streamingWorker(id, tasks);
|
||||
|
@ -692,61 +766,7 @@ module.exports = {
|
|||
streamingWorkerHandler
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 9 */,
|
||||
/* 10 */,
|
||||
/* 11 */,
|
||||
/* 12 */,
|
||||
/* 13 */,
|
||||
/* 14 */,
|
||||
/* 15 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* 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 {
|
||||
originalToGeneratedId,
|
||||
generatedToOriginalId,
|
||||
isGeneratedId,
|
||||
isOriginalId
|
||||
} = __webpack_require__(3);
|
||||
|
||||
const { workerUtils: { WorkerDispatcher } } = __webpack_require__(1);
|
||||
|
||||
const dispatcher = new WorkerDispatcher();
|
||||
|
||||
const getOriginalURLs = dispatcher.task("getOriginalURLs");
|
||||
const getGeneratedRanges = dispatcher.task("getGeneratedRanges", { queue: true });
|
||||
const getGeneratedLocation = dispatcher.task("getGeneratedLocation", { queue: true });
|
||||
const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", { queue: true });
|
||||
const getOriginalLocation = dispatcher.task("getOriginalLocation");
|
||||
const getLocationScopes = dispatcher.task("getLocationScopes");
|
||||
const getOriginalSourceText = dispatcher.task("getOriginalSourceText");
|
||||
const applySourceMap = dispatcher.task("applySourceMap");
|
||||
const clearSourceMaps = dispatcher.task("clearSourceMaps");
|
||||
const hasMappedSource = dispatcher.task("hasMappedSource");
|
||||
|
||||
module.exports = {
|
||||
originalToGeneratedId,
|
||||
generatedToOriginalId,
|
||||
isGeneratedId,
|
||||
isOriginalId,
|
||||
hasMappedSource,
|
||||
getOriginalURLs,
|
||||
getGeneratedRanges,
|
||||
getGeneratedLocation,
|
||||
getAllGeneratedLocations,
|
||||
getOriginalLocation,
|
||||
getLocationScopes,
|
||||
getOriginalSourceText,
|
||||
applySourceMap,
|
||||
clearSourceMaps,
|
||||
startSourceMapWorker: dispatcher.start.bind(dispatcher),
|
||||
stopSourceMapWorker: dispatcher.stop.bind(dispatcher)
|
||||
};
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
||||
/******/ });
|
||||
});
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче