@@ -224,60 +224,60 @@ func testUIWebView() {
224
224
let webview = UIWebView ( )
225
225
226
226
testAsync { string in
227
- _ = await webview. stringByEvaluatingJavaScript ( from: string)
227
+ _ = await webview. stringByEvaluatingJavaScript ( from: string) // BAD [NOT DETECTED]
228
228
}
229
229
}
230
230
231
231
func testWebView( ) {
232
232
let webview = WebView ( )
233
233
234
234
testAsync { string in
235
- _ = await webview. stringByEvaluatingJavaScript ( from: string)
235
+ _ = await webview. stringByEvaluatingJavaScript ( from: string) // BAD [NOT DETECTED]
236
236
}
237
237
}
238
238
239
239
func testWKWebView( ) {
240
240
let webview = WKWebView ( )
241
241
242
242
testAsync { string in
243
- _ = try await webview. evaluateJavaScript ( string)
243
+ _ = try await webview. evaluateJavaScript ( string) // BAD [NOT DETECTED]
244
244
}
245
245
testAsync { string in
246
- await webview. evaluateJavaScript ( string) { _, _ in }
246
+ await webview. evaluateJavaScript ( string) { _, _ in } // BAD [NOT DETECTED]
247
247
}
248
248
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]
250
250
}
251
251
testAsync { string in
252
- _ = try await webview. evaluateJavaScript ( string, contentWorld: . defaultClient)
252
+ _ = try await webview. evaluateJavaScript ( string, contentWorld: . defaultClient) // BAD [NOT DETECTED]
253
253
}
254
254
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]
256
256
}
257
257
testAsync { string in
258
- _ = try await webview. callAsyncJavaScript ( string, contentWorld: WKContentWorld . defaultClient)
258
+ _ = try await webview. callAsyncJavaScript ( string, contentWorld: WKContentWorld . defaultClient) // BAD [NOT DETECTED]
259
259
}
260
260
}
261
261
262
262
func testWKUserContentController( ) {
263
263
let ctrl = WKUserContentController ( )
264
264
265
265
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)
267
267
}
268
268
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)
270
270
}
271
271
}
272
272
273
273
func testJSContext( ) {
274
274
let ctx = JSContext ( )
275
275
276
276
testSync { string in
277
- _ = ctx. evaluateScript ( string)
277
+ _ = ctx. evaluateScript ( string) // BAD (multiple sources)
278
278
}
279
279
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)
281
281
}
282
282
}
283
283
@@ -288,7 +288,7 @@ func testJSEvaluateScript() {
288
288
defer { JSStringRelease ( jsstr) }
289
289
_ = JSEvaluateScript (
290
290
/*ctx:*/ OpaquePointer ( bitPattern: 0 ) ,
291
- /*script:*/ jsstr,
291
+ /*script:*/ jsstr, // BAD (multiple sources)
292
292
/*thisObject:*/ OpaquePointer ( bitPattern: 0 ) ,
293
293
/*sourceURL:*/ OpaquePointer ( bitPattern: 0 ) ,
294
294
/*startingLineNumber:*/ 0 ,
@@ -302,7 +302,7 @@ func testJSEvaluateScript() {
302
302
defer { JSStringRelease ( jsstr) }
303
303
_ = JSEvaluateScript (
304
304
/*ctx:*/ OpaquePointer ( bitPattern: 0 ) ,
305
- /*script:*/ jsstr,
305
+ /*script:*/ jsstr, // BAD (multiple sources)
306
306
/*thisObject:*/ OpaquePointer ( bitPattern: 0 ) ,
307
307
/*sourceURL:*/ OpaquePointer ( bitPattern: 0 ) ,
308
308
/*startingLineNumber:*/ 0 ,
0 commit comments