Revert "Bug 1525492 - [release 123] add types to source-maps API (#7846). r=dwalsh"
authorMrigank Krishan <mrigankkrishan@gmail.com>
Tue, 05 Feb 2019 18:24:56 -0800
changeset 457526 85c562f9b5fd1d8aa5c4b9d6e532b96cb6a0c798
parent 457525 cd7226068bbc06f1a915f1fa749688e6f94492a2
child 457527 5cdb6156ddaf34013e6d5425390499446f4d8d28
push id111734
push userjlaster@mozilla.com
push dateThu, 07 Feb 2019 06:14:53 +0000
treeherdermozilla-inbound@85c562f9b5fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1525492
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Revert "Bug 1525492 - [release 123] add types to source-maps API (#7846). r=dwalsh" This reverts commit da55f11d2fc1a741a10134f6031af991925601cb.
devtools/client/debugger/new/dist/parser-worker.js
devtools/client/debugger/new/src/utils/bootstrap.js
devtools/client/shared/source-map/index.js
--- a/devtools/client/debugger/new/dist/parser-worker.js
+++ b/devtools/client/debugger/new/dist/parser-worker.js
@@ -23125,103 +23125,80 @@ function mapOriginalExpression(expressio
 /***/ }),
 
 /***/ 3646:
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
 
 
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.stopSourceMapWorker = exports.startSourceMapWorker = exports.isOriginalId = exports.isGeneratedId = exports.generatedToOriginalId = exports.originalToGeneratedId = exports.getOriginalStackFrames = exports.hasMappedSource = exports.clearSourceMaps = exports.applySourceMap = exports.getOriginalSourceText = exports.getLocationScopes = exports.getFileGeneratedRange = exports.getOriginalLocation = exports.getAllGeneratedLocations = exports.getGeneratedLocation = exports.getGeneratedRanges = exports.getOriginalRanges = exports.hasOriginalURL = exports.getOriginalURLs = exports.setAssetRootURL = exports.dispatcher = undefined;
-
-var _utils = __webpack_require__(3652);
-
-Object.defineProperty(exports, "originalToGeneratedId", {
-  enumerable: true,
-  get: function () {
-    return _utils.originalToGeneratedId;
-  }
-});
-Object.defineProperty(exports, "generatedToOriginalId", {
-  enumerable: true,
-  get: function () {
-    return _utils.generatedToOriginalId;
-  }
-});
-Object.defineProperty(exports, "isGeneratedId", {
-  enumerable: true,
-  get: function () {
-    return _utils.isGeneratedId;
-  }
-});
-Object.defineProperty(exports, "isOriginalId", {
-  enumerable: true,
-  get: function () {
-    return _utils.isOriginalId;
-  }
-});
-
-var _devtoolsSourceMap = __webpack_require__(3646);
-
-var self = _interopRequireWildcard(_devtoolsSourceMap);
-
-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
  * 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 = exports.dispatcher = new WorkerDispatcher();
-
-const setAssetRootURL = exports.setAssetRootURL = async assetRoot => dispatcher.invoke("setAssetRootURL", assetRoot);
-
-const getOriginalURLs = exports.getOriginalURLs = async generatedSource => dispatcher.invoke("getOriginalURLs", generatedSource);
-
-const hasOriginalURL = exports.hasOriginalURL = async url => dispatcher.invoke("hasOriginalURL", url);
-
-const getOriginalRanges = exports.getOriginalRanges = async (sourceId, url) => dispatcher.invoke("getOriginalRanges", sourceId, url);
-
-const getGeneratedRanges = exports.getGeneratedRanges = async (location, originalSource) => dispatcher.task("getGeneratedRanges", {
+const dispatcher = new WorkerDispatcher();
+
+const setAssetRootURL = dispatcher.task("setAssetRootURL");
+const getOriginalURLs = dispatcher.task("getOriginalURLs");
+const hasOriginalURL = dispatcher.task("hasOriginalURL");
+const getOriginalRanges = dispatcher.task("getOriginalRanges");
+const getGeneratedRanges = dispatcher.task("getGeneratedRanges", {
+  queue: true
+});
+const getGeneratedLocation = dispatcher.task("getGeneratedLocation", {
+  queue: true
+});
+const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
   queue: true
-})(location, originalSource);
-
-const getGeneratedLocation = exports.getGeneratedLocation = async (location, originalSource) => dispatcher.task("getGeneratedLocation", { queue: true })(location, originalSource);
-
-const getAllGeneratedLocations = exports.getAllGeneratedLocations = async (location, originalSource) => dispatcher.task("getAllGeneratedLocations", { queue: true })(location, originalSource);
-
-const getOriginalLocation = exports.getOriginalLocation = async (location, options = {}) => dispatcher.invoke("getOriginalLocation", location, options);
-
-const getFileGeneratedRange = exports.getFileGeneratedRange = async originalSource => dispatcher.invoke("getFileGeneratedRange", originalSource);
-
-const getLocationScopes = exports.getLocationScopes = dispatcher.task("getLocationScopes");
-
-const getOriginalSourceText = exports.getOriginalSourceText = async originalSource => dispatcher.invoke("getOriginalSourceText", originalSource);
-
-const applySourceMap = exports.applySourceMap = async (generatedId, url, code, mappings) => dispatcher.invoke("applySourceMap", generatedId, url, code, mappings);
-
-const clearSourceMaps = exports.clearSourceMaps = async () => dispatcher.invoke("clearSourceMaps");
-
-const hasMappedSource = exports.hasMappedSource = async location => dispatcher.invoke("hasMappedSource", location);
-
-const getOriginalStackFrames = exports.getOriginalStackFrames = async generatedLocation => dispatcher.invoke("getOriginalStackFrames", generatedLocation);
-
-const startSourceMapWorker = exports.startSourceMapWorker = (url, assetRoot) => {
-  dispatcher.start(url);
-  setAssetRootURL(assetRoot);
-};
-const stopSourceMapWorker = exports.stopSourceMapWorker = dispatcher.stop.bind(dispatcher);
-
-exports.default = self;
+});
+const getOriginalLocation = dispatcher.task("getOriginalLocation");
+const getFileGeneratedRange = dispatcher.task("getFileGeneratedRange");
+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");
+const getOriginalStackFrames = dispatcher.task("getOriginalStackFrames");
+
+module.exports = {
+  originalToGeneratedId,
+  generatedToOriginalId,
+  isGeneratedId,
+  isOriginalId,
+  hasMappedSource,
+  getOriginalURLs,
+  hasOriginalURL,
+  getOriginalRanges,
+  getGeneratedRanges,
+  getGeneratedLocation,
+  getAllGeneratedLocations,
+  getOriginalLocation,
+  getFileGeneratedRange,
+  getLocationScopes,
+  getOriginalSourceText,
+  applySourceMap,
+  clearSourceMaps,
+  getOriginalStackFrames,
+  startSourceMapWorker(url, assetRoot) {
+    dispatcher.start(url);
+    setAssetRootURL(assetRoot);
+  },
+  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
--- a/devtools/client/debugger/new/src/utils/bootstrap.js
+++ b/devtools/client/debugger/new/src/utils/bootstrap.js
@@ -17,17 +17,16 @@ import * as parser from "../workers/pars
 
 import configureStore from "../actions/utils/create-store";
 import reducers from "../reducers";
 import * as selectors from "../selectors";
 import App from "../components/App";
 import { asyncStore, prefs } from "./prefs";
 
 import type { Panel } from "../client/firefox/types";
-import typeof SourceMaps from "../../packages/devtools-source-map/src";
 
 function renderPanel(component, store) {
   const root = document.createElement("div");
   root.className = "launchpad-root theme-body";
   root.style.setProperty("flex", "1");
   const mount = document.querySelector("#mount");
   if (!mount) {
     return;
@@ -37,17 +36,17 @@ function renderPanel(component, store) {
   ReactDOM.render(
     React.createElement(Provider, { store }, React.createElement(component)),
     root
   );
 }
 
 export function bootstrapStore(
   client: any,
-  sourceMaps: SourceMaps,
+  sourceMaps: Object,
   panel: Panel,
   initialState: Object
 ) {
   const createStore = configureStore({
     log: prefs.logging || isTesting(),
     timing: isDevelopment(),
     makeThunkArgs: (args, state) => {
       return { ...args, client, sourceMaps, panel };
--- a/devtools/client/shared/source-map/index.js
+++ b/devtools/client/shared/source-map/index.js
@@ -414,103 +414,80 @@ function isSlowBuffer (obj) {
 /***/ }),
 
 /***/ 3646:
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
 
 
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.stopSourceMapWorker = exports.startSourceMapWorker = exports.isOriginalId = exports.isGeneratedId = exports.generatedToOriginalId = exports.originalToGeneratedId = exports.getOriginalStackFrames = exports.hasMappedSource = exports.clearSourceMaps = exports.applySourceMap = exports.getOriginalSourceText = exports.getLocationScopes = exports.getFileGeneratedRange = exports.getOriginalLocation = exports.getAllGeneratedLocations = exports.getGeneratedLocation = exports.getGeneratedRanges = exports.getOriginalRanges = exports.hasOriginalURL = exports.getOriginalURLs = exports.setAssetRootURL = exports.dispatcher = undefined;
-
-var _utils = __webpack_require__(3652);
-
-Object.defineProperty(exports, "originalToGeneratedId", {
-  enumerable: true,
-  get: function () {
-    return _utils.originalToGeneratedId;
-  }
-});
-Object.defineProperty(exports, "generatedToOriginalId", {
-  enumerable: true,
-  get: function () {
-    return _utils.generatedToOriginalId;
-  }
-});
-Object.defineProperty(exports, "isGeneratedId", {
-  enumerable: true,
-  get: function () {
-    return _utils.isGeneratedId;
-  }
-});
-Object.defineProperty(exports, "isOriginalId", {
-  enumerable: true,
-  get: function () {
-    return _utils.isOriginalId;
-  }
-});
-
-var _devtoolsSourceMap = __webpack_require__(3646);
-
-var self = _interopRequireWildcard(_devtoolsSourceMap);
-
-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
  * 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 = exports.dispatcher = new WorkerDispatcher();
-
-const setAssetRootURL = exports.setAssetRootURL = async assetRoot => dispatcher.invoke("setAssetRootURL", assetRoot);
-
-const getOriginalURLs = exports.getOriginalURLs = async generatedSource => dispatcher.invoke("getOriginalURLs", generatedSource);
-
-const hasOriginalURL = exports.hasOriginalURL = async url => dispatcher.invoke("hasOriginalURL", url);
-
-const getOriginalRanges = exports.getOriginalRanges = async (sourceId, url) => dispatcher.invoke("getOriginalRanges", sourceId, url);
+const dispatcher = new WorkerDispatcher();
 
-const getGeneratedRanges = exports.getGeneratedRanges = async (location, originalSource) => dispatcher.task("getGeneratedRanges", {
+const setAssetRootURL = dispatcher.task("setAssetRootURL");
+const getOriginalURLs = dispatcher.task("getOriginalURLs");
+const hasOriginalURL = dispatcher.task("hasOriginalURL");
+const getOriginalRanges = dispatcher.task("getOriginalRanges");
+const getGeneratedRanges = dispatcher.task("getGeneratedRanges", {
+  queue: true
+});
+const getGeneratedLocation = dispatcher.task("getGeneratedLocation", {
   queue: true
-})(location, originalSource);
-
-const getGeneratedLocation = exports.getGeneratedLocation = async (location, originalSource) => dispatcher.task("getGeneratedLocation", { queue: true })(location, originalSource);
-
-const getAllGeneratedLocations = exports.getAllGeneratedLocations = async (location, originalSource) => dispatcher.task("getAllGeneratedLocations", { queue: true })(location, originalSource);
-
-const getOriginalLocation = exports.getOriginalLocation = async (location, options = {}) => dispatcher.invoke("getOriginalLocation", location, options);
+});
+const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
+  queue: true
+});
+const getOriginalLocation = dispatcher.task("getOriginalLocation");
+const getFileGeneratedRange = dispatcher.task("getFileGeneratedRange");
+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");
+const getOriginalStackFrames = dispatcher.task("getOriginalStackFrames");
 
-const getFileGeneratedRange = exports.getFileGeneratedRange = async originalSource => dispatcher.invoke("getFileGeneratedRange", originalSource);
-
-const getLocationScopes = exports.getLocationScopes = dispatcher.task("getLocationScopes");
-
-const getOriginalSourceText = exports.getOriginalSourceText = async originalSource => dispatcher.invoke("getOriginalSourceText", originalSource);
-
-const applySourceMap = exports.applySourceMap = async (generatedId, url, code, mappings) => dispatcher.invoke("applySourceMap", generatedId, url, code, mappings);
-
-const clearSourceMaps = exports.clearSourceMaps = async () => dispatcher.invoke("clearSourceMaps");
-
-const hasMappedSource = exports.hasMappedSource = async location => dispatcher.invoke("hasMappedSource", location);
-
-const getOriginalStackFrames = exports.getOriginalStackFrames = async generatedLocation => dispatcher.invoke("getOriginalStackFrames", generatedLocation);
-
-const startSourceMapWorker = exports.startSourceMapWorker = (url, assetRoot) => {
-  dispatcher.start(url);
-  setAssetRootURL(assetRoot);
+module.exports = {
+  originalToGeneratedId,
+  generatedToOriginalId,
+  isGeneratedId,
+  isOriginalId,
+  hasMappedSource,
+  getOriginalURLs,
+  hasOriginalURL,
+  getOriginalRanges,
+  getGeneratedRanges,
+  getGeneratedLocation,
+  getAllGeneratedLocations,
+  getOriginalLocation,
+  getFileGeneratedRange,
+  getLocationScopes,
+  getOriginalSourceText,
+  applySourceMap,
+  clearSourceMaps,
+  getOriginalStackFrames,
+  startSourceMapWorker(url, assetRoot) {
+    dispatcher.start(url);
+    setAssetRootURL(assetRoot);
+  },
+  stopSourceMapWorker: dispatcher.stop.bind(dispatcher)
 };
-const stopSourceMapWorker = exports.stopSourceMapWorker = dispatcher.stop.bind(dispatcher);
-
-exports.default = self;
 
 /***/ }),
 
 /***/ 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