getHostForPath => generateHostForPath
The original name implies no side effect, but is is not true.
This commit is contained in:
parent
c1272743b9
commit
f29598d907
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ const url = require('url')
|
||||||
var hostPathMap = {}
|
var hostPathMap = {}
|
||||||
var hostPathMapNextKey = 0
|
var hostPathMapNextKey = 0
|
||||||
|
|
||||||
var getHostForPath = function (path) {
|
var generateHostForPath = function (path) {
|
||||||
var key
|
var key
|
||||||
key = 'extension-' + (++hostPathMapNextKey)
|
key = 'extension-' + (++hostPathMapNextKey)
|
||||||
hostPathMap[key] = path
|
hostPathMap[key] = path
|
||||||
|
@ -30,7 +30,7 @@ var getExtensionInfoFromPath = function (srcDirectory) {
|
||||||
page = url.format({
|
page = url.format({
|
||||||
protocol: 'chrome-extension',
|
protocol: 'chrome-extension',
|
||||||
slashes: true,
|
slashes: true,
|
||||||
hostname: getHostForPath(srcDirectory),
|
hostname: generateHostForPath(srcDirectory),
|
||||||
pathname: manifest.devtools_page
|
pathname: manifest.devtools_page
|
||||||
})
|
})
|
||||||
extensionInfoMap[manifest.name] = {
|
extensionInfoMap[manifest.name] = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue