Skip to content

Commit f258911

Browse files
committed
fix remove test
1 parent f1accca commit f258911

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter

packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/AndroidWebkitLibrary.g.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ class AndroidWebkitLibraryPigeonInstanceManager(
155155
*/
156156
fun <T> remove(identifier: Long): T? {
157157
logWarningIfFinalizationListenerHasStopped()
158+
val instance: Any? = getInstance(identifier)
159+
if (instance is WebViewProxyApi.WebViewPlatformView) {
160+
instance.destroy()
161+
}
158162
return strongInstances.remove(identifier) as T?
159163
}
160164

0 commit comments

Comments
 (0)