MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
966 stars 133 forks source link

Supplying null as a callback to WKWebsiteDataStore.getDefaultDataStore.removeData causes crash #799

Open klianc09 opened 1 week ago

klianc09 commented 1 week ago

Issue details

Calling WKWebsiteDataStore.getDefaultDataStore().removeData and passing 'null' as the Runnable callback will cause a crash. Usually when a Runnable is used as a callback handler, one can just pass in null, and it will work fine. Workaround is simple, just supply an empty lambda.

Reproduction steps/code

WKWebsiteDataStore.getDefaultDataStore().removeData(WKWebsiteDataStore.getAllWebsiteDataTypes(), NSDate.getDistantPast(), null);

Configuration

Build Tools:

Versions:

Build Targets:

This is tested on an M1, with the iPhone 15 Simulator, (running iOS 17.5)