Files
Vidal Guillermo Diazleal Ortega 5151f41f3f npm package security updates (babel/traverse)
I ran the following script to update @babel/traverse from 7.15.4 to 7.23.2 packages
to address the security issue tracked in crbug.com/1493744:

`npm run install-deps audit fix --audit-level=critical`

Bug: 1493744
Change-Id: Ie3fa0dc0527b6fa9e4b7906ee2034b95900c6033
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4953413
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2023-10-20 17:29:27 +00:00

47 lines
1.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clear = clear;
exports.clearPath = clearPath;
exports.clearScope = clearScope;
exports.getCachedPaths = getCachedPaths;
exports.getOrCreateCachedPaths = getOrCreateCachedPaths;
exports.scope = exports.path = void 0;
let pathsCache = new WeakMap();
exports.path = pathsCache;
let scope = new WeakMap();
exports.scope = scope;
function clear() {
clearPath();
clearScope();
}
function clearPath() {
exports.path = pathsCache = new WeakMap();
}
function clearScope() {
exports.scope = scope = new WeakMap();
}
const nullHub = Object.freeze({});
function getCachedPaths(hub, parent) {
var _pathsCache$get, _hub;
{
hub = null;
}
return (_pathsCache$get = pathsCache.get((_hub = hub) != null ? _hub : nullHub)) == null ? void 0 : _pathsCache$get.get(parent);
}
function getOrCreateCachedPaths(hub, parent) {
var _hub2, _hub3;
{
hub = null;
}
let parents = pathsCache.get((_hub2 = hub) != null ? _hub2 : nullHub);
if (!parents) pathsCache.set((_hub3 = hub) != null ? _hub3 : nullHub, parents = new WeakMap());
let paths = parents.get(parent);
if (!paths) parents.set(parent, paths = new Map());
return paths;
}
//# sourceMappingURL=cache.js.map