| Summary: | Memory Leak for WKWebView:evaluateJavaScript:completionHandler | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Paula <paulayurie.oy> | ||||
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | achristensen, tmoura, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | iPhone / iPad | ||||||
| OS: | iOS 16 | ||||||
| Attachments: |
|
||||||
Created attachment 465132 [details] Memory Graph Screenshot Memory leaks (Malloc 32 Bytes x 4) when calling WKWebView.evaluateJavaScript passing a completion handler. Code example: extension ViewController: WKNavigationDelegate { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { webView.evaluateJavaScript("document.documentElement.scrollHeight", completionHandler: { (height, error) in self.webViewHeightConstraint?.constant = height as! CGFloat }) } } On the memory graph it is possible to see that it is on JavaScriptCore. Tested on iOS 16.2 and 16.0.1.