dart:indexed_db: deprecate IdbFactory.supportsDatabaseNames
This has been removed from modern browsers - always returns false
See https://chromestatus.com/features/5725741740195840
Fixes https://github.com/dart-lang/sdk/issues/48047
Change-Id: Ie93757f664d892ba365a99c524a8ae79466e5002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226180
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e43ad5..67b4b8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,11 @@
error with an existing stack trace, instead of creating
a new stack trace.
+#### `dart:indexed_db`
+
+- `IdbFactory.supportsDatabaseNames` has been deprecated. It will always return
+ `false`.
+
#### `dart:io`
- **Breaking Change** [#47769](https://github.com/dart-lang/sdk/issues/47769):
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index e26356c..1df1cc9 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -507,14 +507,10 @@
}
/**
- * Checks to see if getDatabaseNames is supported by the current platform.
- * TODO(terry): Should be able to always return false?
+ * Deprecated. Always returns `false`.
*/
- bool get supportsDatabaseNames {
- return supported &&
- JS('bool', '!!(#.getDatabaseNames || #.webkitGetDatabaseNames)', this,
- this);
- }
+ @Deprecated('No longer supported on modern browsers. Always returns false.')
+ bool get supportsDatabaseNames => false;
// To suppress missing implicit constructor warnings.
factory IdbFactory._() {
diff --git a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
index b046771..112e19a 100644
--- a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
@@ -63,13 +63,10 @@
}
/**
- * Checks to see if getDatabaseNames is supported by the current platform.
- * TODO(terry): Should be able to always return false?
+ * Deprecated. Always returns `false`.
*/
- bool get supportsDatabaseNames {
- return supported && JS('bool',
- '!!(#.getDatabaseNames || #.webkitGetDatabaseNames)', this, this);
- }
+ @Deprecated('No longer supported on modern browsers. Always returns false.')
+ bool get supportsDatabaseNames => false;
$!MEMBERS
}