@@ -224,60 +224,60 @@ func testUIWebView() {
224224 let webview = UIWebView ( )
225225
226226 testAsync { string in
227- _ = await webview . stringByEvaluatingJavaScript ( from : string )
227+ _ = await webview . stringByEvaluatingJavaScript ( from : string ) // BAD [NOT DETECTED]
228228 }
229229}
230230
231231func testWebView ( ) {
232232 let webview = WebView ( )
233233
234234 testAsync { string in
235- _ = await webview . stringByEvaluatingJavaScript ( from : string )
235+ _ = await webview . stringByEvaluatingJavaScript ( from : string ) // BAD [NOT DETECTED]
236236 }
237237}
238238
239239func testWKWebView ( ) {
240240 let webview = WKWebView ( )
241241
242242 testAsync { string in
243- _ = try await webview . evaluateJavaScript ( string )
243+ _ = try await webview . evaluateJavaScript ( string ) // BAD [NOT DETECTED]
244244 }
245245 testAsync { string in
246- await webview . evaluateJavaScript ( string ) { _ , _ in }
246+ await webview . evaluateJavaScript ( string ) { _ , _ in } // BAD [NOT DETECTED]
247247 }
248248 testAsync { string in
249- await webview . evaluateJavaScript ( string , in : nil , in : WKContentWorld . defaultClient ) { _ in }
249+ await webview . evaluateJavaScript ( string , in : nil , in : WKContentWorld . defaultClient ) { _ in } // BAD [NOT DETECTED]
250250 }
251251 testAsync { string in
252- _ = try await webview . evaluateJavaScript ( string , contentWorld : . defaultClient )
252+ _ = try await webview . evaluateJavaScript ( string , contentWorld : . defaultClient ) // BAD [NOT DETECTED]
253253 }
254254 testAsync { string in
255- await webview . callAsyncJavaScript ( string , in : nil , in : . defaultClient ) { _ in ( ) }
255+ await webview . callAsyncJavaScript ( string , in : nil , in : . defaultClient ) { _ in ( ) } // BAD [NOT DETECTED]
256256 }
257257 testAsync { string in
258- _ = try await webview . callAsyncJavaScript ( string , contentWorld : WKContentWorld . defaultClient )
258+ _ = try await webview . callAsyncJavaScript ( string , contentWorld : WKContentWorld . defaultClient ) // BAD [NOT DETECTED]
259259 }
260260}
261261
262262func testWKUserContentController ( ) {
263263 let ctrl = WKUserContentController ( )
264264
265265 testSync { string in
266- ctrl . addUserScript ( WKUserScript ( source : string , injectionTime : . atDocumentStart , forMainFrameOnly : false ) )
266+ ctrl . addUserScript ( WKUserScript ( source : string , injectionTime : . atDocumentStart , forMainFrameOnly : false ) ) // BAD (multiple sources)
267267 }
268268 testSync { string in
269- ctrl . addUserScript ( WKUserScript ( source : string , injectionTime : . atDocumentEnd , forMainFrameOnly : true , in : . defaultClient ) )
269+ ctrl . addUserScript ( WKUserScript ( source : string , injectionTime : . atDocumentEnd , forMainFrameOnly : true , in : . defaultClient ) ) // BAD (multiple sources)
270270 }
271271}
272272
273273func testJSContext ( ) {
274274 let ctx = JSContext ( )
275275
276276 testSync { string in
277- _ = ctx . evaluateScript ( string )
277+ _ = ctx . evaluateScript ( string ) // BAD (multiple sources)
278278 }
279279 testSync { string in
280- _ = ctx . evaluateScript ( string , withSourceURL : URL ( string : " https://example.com " ) )
280+ _ = ctx . evaluateScript ( string , withSourceURL : URL ( string : " https://example.com " ) ) // BAD (multiple sources)
281281 }
282282}
283283
@@ -288,7 +288,7 @@ func testJSEvaluateScript() {
288288 defer { JSStringRelease ( jsstr ) }
289289 _ = JSEvaluateScript (
290290 /*ctx:*/ OpaquePointer ( bitPattern : 0 ) ,
291- /*script:*/ jsstr ,
291+ /*script:*/ jsstr , // BAD (multiple sources)
292292 /*thisObject:*/ OpaquePointer ( bitPattern : 0 ) ,
293293 /*sourceURL:*/ OpaquePointer ( bitPattern : 0 ) ,
294294 /*startingLineNumber:*/ 0 ,
@@ -302,7 +302,7 @@ func testJSEvaluateScript() {
302302 defer { JSStringRelease ( jsstr ) }
303303 _ = JSEvaluateScript (
304304 /*ctx:*/ OpaquePointer ( bitPattern : 0 ) ,
305- /*script:*/ jsstr ,
305+ /*script:*/ jsstr , // BAD (multiple sources)
306306 /*thisObject:*/ OpaquePointer ( bitPattern : 0 ) ,
307307 /*sourceURL:*/ OpaquePointer ( bitPattern : 0 ) ,
308308 /*startingLineNumber:*/ 0 ,
0 commit comments