Skip to content

Commit ff8b796

Browse files
authored
Merge pull request #14692 from geoffw0/webview3
Swift: Simplify AdoptsWkNavigationDelegate in WebView.qll.
2 parents 49a4306 + b926090 commit ff8b796

File tree

1 file changed

+1
-6
lines changed
  • swift/ql/lib/codeql/swift/frameworks/StandardLibrary

1 file changed

+1
-6
lines changed

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/WebView.qll

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ private class WKScriptMessageBodyInheritsTaint extends TaintInheritingContent,
4343
*/
4444
private class AdoptsWkNavigationDelegate extends Decl {
4545
AdoptsWkNavigationDelegate() {
46-
exists(ProtocolDecl delegate |
47-
this.(ExtensionDecl).getAProtocol().getABaseTypeDecl*() = delegate or
48-
this.(NominalTypeDecl).getABaseTypeDecl*() = delegate
49-
|
50-
delegate.getName() = "WKNavigationDelegate"
51-
)
46+
this.asNominalTypeDecl().getABaseTypeDecl*().(ProtocolDecl).getName() = "WKNavigationDelegate"
5247
}
5348
}
5449

0 commit comments

Comments
 (0)