You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/html/indexeddb_3_test fails because it expects an exception of type IDBDatabaseException.
Due to the lack of re-export (bug 760), most of the dom types are wrapped to give functionally equivalent html types. Some of the DOM types are thrown. This means every method needs to be wrapped in a try-catch to ensure wrapping.
I hope 760 is resolved and implemented soon so we don't have to implement the following:
Example:
List<String> get objectStoreNames() => _wrap(_ptr.objectStoreNames);
tests/html/indexeddb_3_test fails because it expects an exception of type IDBDatabaseException.
Due to the lack of re-export (bug 760), most of the dom types are wrapped to give functionally equivalent html types. Some of the DOM types are thrown. This means every method needs to be wrapped in a try-catch to ensure wrapping.
I hope 760 is resolved and implemented soon so we don't have to implement the following:
Example:
List<String> get objectStoreNames() => _wrap(_ptr.objectStoreNames);
void deleteObjectStore(String name) {
_ptr.deleteObjectStore(_unwrap(name));
return;
}
Will have to become
List<String> get objectStoreNames() {
try {
return _wrap(_ptr.objectStoreNames);
} catch (var e) {
if (e is _DOMTypeBase) throw _wrap(e);
throw;
}
}
void deleteObjectStore(String name) {
try {
_ptr.deleteObjectStore(_unwrap(name));
return;
} catch (var e) {
if (e is _DOMTypeBase) throw _wrap(e);
throw;
}
}
I guess we could write helpers that took closures - that would shrink the code size at the expense of adding a closure allocation to every dom call:
List<String> get objectStoreNames() => _wrap_value_and_exceptions(() => _ptr.objectStoreNames);
The text was updated successfully, but these errors were encountered: