Bug 1364839 - devtools-source-map v0.5.0: Update bundle from GitHub; r?jdescottes
MozReview-Commit-ID: 7j2hOyipkkL
--- a/devtools/client/shared/source-map/index.js
+++ b/devtools/client/shared/source-map/index.js
@@ -498,28 +498,36 @@ return /******/ (function(modules) { //
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
}
/***/ },
/* 6 */
/***/ 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
};
/***/ },
/* 7 */
/***/ 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 new Promise((resolve, reject) => {
const req = new XMLHttpRequest();
req.addEventListener("readystatechange", () => {
if (req.readyState === XMLHttpRequest.DONE) {
if (req.status === 200) {
resolve({ content: req.responseText });
@@ -549,17 +557,19 @@ return /******/ (function(modules) { //
/* 8 */
/***/ function(module, exports) {
function WorkerDispatcher() {
this.msgId = 1;
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/. */
WorkerDispatcher.prototype = {
start(url) {
this.worker = new Worker(url);
this.worker.onerror = () => {
console.error(`Error in worker ${url}`);
};
},
--- a/devtools/client/shared/source-map/worker.js
+++ b/devtools/client/shared/source-map/worker.js
@@ -487,28 +487,36 @@ return /******/ (function(modules) { //
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
}
/***/ },
/* 6 */
/***/ 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
};
/***/ },
/* 7 */
/***/ 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 new Promise((resolve, reject) => {
const req = new XMLHttpRequest();
req.addEventListener("readystatechange", () => {
if (req.readyState === XMLHttpRequest.DONE) {
if (req.status === 200) {
resolve({ content: req.responseText });
@@ -538,17 +546,19 @@ return /******/ (function(modules) { //
/* 8 */
/***/ function(module, exports) {
function WorkerDispatcher() {
this.msgId = 1;
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/. */
WorkerDispatcher.prototype = {
start(url) {
this.worker = new Worker(url);
this.worker.onerror = () => {
console.error(`Error in worker ${url}`);
};
},
@@ -2340,17 +2350,22 @@ return /******/ (function(modules) { //
}
function dirname(path) {
const idx = path.lastIndexOf("/");
return path.slice(0, idx);
}
function isURL(str) {
- return str.indexOf("://") !== -1;
+ try {
+ new URL(str);
+ return true;
+ } catch (e) {
+ return false;
+ }
}
function isAbsolute(str) {
return str[0] === "/";
}
function join(base, dir) {
return `${base}/${dir}`;