Bug 1364839 - devtools-source-map v0.5.0: Update bundle from GitHub; r?jdescottes draft
authorTom Tromey <tom@tromey.com>
Tue, 16 May 2017 08:11:11 -0600
changeset 578784 2744e0e67371a5900b6840ec30003f682bba3595
parent 577588 77dbf5613f9047e21710337a428ce45a7ea22dce
child 578878 0e2971461419461a5d091044ee232fa118d81eb4
child 578987 afa3be07a373527e3fba31512aa357a89b9e78fe
push id59057
push userbmo:ttromey@mozilla.com
push dateTue, 16 May 2017 14:13:25 +0000
reviewersjdescottes
bugs1364839
milestone55.0a1
Bug 1364839 - devtools-source-map v0.5.0: Update bundle from GitHub; r?jdescottes MozReview-Commit-ID: 7j2hOyipkkL
devtools/client/shared/source-map/index.js
devtools/client/shared/source-map/worker.js
--- 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}`;