Fixed invalid JSBody annotation in IDBObjectStore, fixed IDBFactory compatibility check (#582)

* Fixed invalid JSBody annotation in IDBObjectStore
* Fixed backwards IndexedDB support check, it was throwing an exception only if IndexedDB IS SUPPORTED
This commit is contained in:
LAX1DUDE 2022-02-14 23:04:20 -08:00 committed by GitHub
parent 8d02dc0f4a
commit 19f070840c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ public abstract class IDBFactory implements JSObject {
public static IDBFactory getInstance() {
IDBFactory factory = getInstanceImpl();
if (!factory.isUndefined()) {
if (factory.isUndefined()) {
throw new IllegalStateException("IndexedDB is not supported in this browser");
}
return factory;

View File

@ -36,8 +36,8 @@ public abstract class IDBObjectStore implements JSObject, IDBCursorSource {
}
}
@JSBody(script = "return this;")
private native String[] unwrapStringArray(JSObject obj);
@JSBody(params = "obj", script = "return obj;")
private static native String[] unwrapStringArray(JSObject obj);
@JSProperty
public abstract String[] getIndexNames();