Bug 1547307 - Part 4: Remove unused createSource function. r=jlast
authorLogan Smyth <loganfsmyth@gmail.com>
Fri, 26 Apr 2019 17:37:52 +0000
changeset 530392 fc69b2a782899b8bb1dc76b4eeb3ea6fd5514668
parent 530391 105886e67ebbafce785b93a00fa0d36a9bd14e9a
child 530393 9ab44b7c5516c72610f15b08f616fa4877256659
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1547307
milestone68.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
Bug 1547307 - Part 4: Remove unused createSource function. r=jlast Depends on D29017 Differential Revision: https://phabricator.services.mozilla.com/D29018
devtools/client/debugger/src/reducers/sources.js
--- a/devtools/client/debugger/src/reducers/sources.js
+++ b/devtools/client/debugger/src/reducers/sources.js
@@ -11,17 +11,16 @@
 
 import { createSelector } from "reselect";
 import {
   getPrettySourceURL,
   underRoot,
   getRelativeUrl,
   isGenerated,
   isOriginal as isOriginalSource,
-  isUrlExtension,
   getPlainUrl
 } from "../utils/source";
 
 import * as asyncValue from "../utils/async-value";
 import type { AsyncValue, SettledValue } from "../utils/async-value";
 import { originalToGeneratedId } from "devtools-source-map";
 import { prefs } from "../utils/prefs";
 
@@ -103,31 +102,16 @@ export function initialSourcesState(): S
     selectedLocation: undefined,
     pendingSelectedLocation: prefs.pendingSelectedLocation,
     projectDirectoryRoot: prefs.projectDirectoryRoot,
     chromeAndExtenstionsEnabled: prefs.chromeAndExtenstionsEnabled,
     focusedItem: null
   };
 }
 
-export function createSource(state: SourcesState, source: Object): Source {
-  const root = state.projectDirectoryRoot;
-  return {
-    id: undefined,
-    url: undefined,
-    sourceMapURL: undefined,
-    isBlackBoxed: false,
-    isPrettyPrinted: false,
-    isWasm: false,
-    isExtension: (source.url && isUrlExtension(source.url)) || false,
-    relativeUrl: getRelativeUrl(source, root),
-    ...source
-  };
-}
-
 function update(
   state: SourcesState = initialSourcesState(),
   action: Action
 ): SourcesState {
   let location = null;
 
   switch (action.type) {
     case "CLEAR_SOURCE_MAP_URL":