mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
JS: Deprecate PathExpr and related classes
This commit is contained in:
@@ -214,7 +214,7 @@ module HTML {
|
||||
result = path.regexpCapture("file://(/.*)", 1)
|
||||
or
|
||||
not path.regexpMatch("(\\w+:)?//.*") and
|
||||
result = this.getSourcePath().(ScriptSrcPath).resolve(this.getSearchRoot()).toString()
|
||||
result = ResolveScriptSrc::resolve(this.getSearchRoot(), this.getSourcePath()).toString()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -274,10 +274,16 @@ module HTML {
|
||||
)
|
||||
}
|
||||
|
||||
private module ResolverConfig implements Folder::ResolveSig {
|
||||
predicate shouldResolve(Container base, string path) { scriptSrc(path, base) }
|
||||
}
|
||||
|
||||
private module ResolveScriptSrc = Folder::Resolve<ResolverConfig>;
|
||||
|
||||
/**
|
||||
* A path string arising from the `src` attribute of a `script` tag.
|
||||
*/
|
||||
private class ScriptSrcPath extends PathString {
|
||||
deprecated private class ScriptSrcPath extends PathString {
|
||||
ScriptSrcPath() { scriptSrc(this, _) }
|
||||
|
||||
override Folder getARootFolder() { scriptSrc(this, result) }
|
||||
|
||||
Reference in New Issue
Block a user