mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 20:19:23 +00:00
490421d166
APIs in dart:html (that take a Dictionary) will receive a Dart Map parameter. The Map parameter must be converted to a Dictionary before passing to the browser's API. Before this change, any Promise/Future API with a Map/Dictionary parameter never called the Promise and didn't return a Dart Future - now it does. This caused a number of breaks especially in Service Workers (register, etc.). Here is a complete list of the fixed APIs: BackgroundFetchManager Future<BackgroundFetchRegistration> fetch(String id, Object requests, [Map options]) CacheStorage Future match(/*RequestInfo*/ request, [Map options]) CanMakePayment Future<List<Client>> matchAll([Map options]) CookieStore Future getAll([Map options]) Future set(String name, String value, [Map options]) CredentialsContainer Future get([Map options]) Future create([Map options]) DirectoryEntry Future<Entry> _getDirectory(String path, {Map options}) Future<Entry> _getFile(String path, {Map options}) ImageCapture Future setOptions(Map photoSettings) MediaCapabilities Future<MediaCapabilitiesInfo> decodingInfo(Map configuration) Future<MediaCapabilitiesInfo> encodingInfo(Map configuration) MediaStreamTrack Future applyConstraints([Map constraints]) Navigator Future requestKeyboardLock([List<String> keyCodes]) Future requestMidiAccess([Map options]) Future share([Map data]) OffscreenCanvas Future<Blob> convertToBlob([Map options]) PaymentInstruments Future set(String instrumentKey, Map details) Permissions Future<PermissionStatus> query(Map permission) Future<PermissionStatus> request(Map permissions) Future<PermissionStatus> revoke(Map permission) PushManager Future permissionState([Map options]) Future<PushSubscription> subscribe([Map options]) RtcPeerConnection REMOVED: Future createAnswer([options_OR_successCallback, RtcPeerConnectionErrorCallback failureCallback, Map mediaConstraints]) REMOVED: Future createOffer([options_OR_successCallback, RtcPeerConnectionErrorCallback failureCallback, Map rtcOfferOptions]) REMOVED: Future setLocalDescription(Map description, VoidCallback successCallback, [RtcPeerConnectionErrorCallback failureCallback]) REMOVED: Future setLocalDescription(Map description, VoidCallback successCallback, [RtcPeerConnectionErrorCallback failureCallback]) Future<RtcSessionDescription> createAnswer([Map options]) Future<RtcSessionDescription> createOffer([Map options]) Future setLocalDescription(Map description) Future setRemoteDescription(Map description) ServiceWorkerContainer Future<ServiceWorkerRegistration> register(String url, [Map options]) ServiceWorkerRegistration Future<List<Notification>> getNotifications([Map filter]) Future showNotification(String title, [Map options]) VRDevice Future requestSession([Map options]) Future supportsSession([Map options]) VRSession Future requestFrameOfReference(String type, [Map options]) Window Future fetch(/*RequestInfo*/ input, [Map init]) WorkerGlobalScope Future fetch(/*RequestInfo*/ input, [Map init]) In addition, exposed Service Worker "self" as a static getter named "instance". The instance is exposed on four different Service Worker classes and can throw a InstanceTypeError if the instance isn't of the class expected (WorkerGlobalScope.instance will always work and not throw): * SharedWorkerGlobalScope.instance * DedicatedWorkerGlobalScope.instance * ServiceWorkerGlobalScope.instance * WorkerGlobalScope.instance R=vsm@google.com Bug: #34202 Change-Id: I641ccbff7cc771465dd32c73db20eba5d6667939 Reviewed-on: https://dart-review.googlesource.com/c/74482 Commit-Queue: Terry Lucas <terry@google.com> Reviewed-by: Vijay Menon <vsm@google.com> Reviewed-by: Jenny Messerly <jmesserly@google.com> |
||
---|---|---|
.. | ||
android | ||
apps/update_homebrew | ||
bots | ||
buildtools | ||
dart2js | ||
dom | ||
gardening | ||
infra/config | ||
linux_dist_support/debian | ||
migration | ||
patches/flutter-engine | ||
sdks | ||
spec_parser | ||
test_generators | ||
testing | ||
.gitignore | ||
3xhead_flutter_hooks.sh | ||
addlatexhash.dart | ||
archive_crash.py | ||
build.py | ||
canary.dart | ||
capture_screenshot.ps1 | ||
clean_output_directory.py | ||
copy_dart.py | ||
copy_tree.py | ||
create_debian_chroot.sh | ||
create_debian_packages.py | ||
create_pkg_manifest.py | ||
create_tarball.py | ||
create_timestamp_file.py | ||
download_chromium_sysroot.sh | ||
download_latest_dev_sdk.py | ||
execute_recorded_testcases.py | ||
FAKE_COMMITS | ||
find_depot_tools.py | ||
gen_fuchsia_test_manifest.py | ||
generate_buildfiles.py | ||
gn.py | ||
gn_helpers.py | ||
line_doc_comments.dart | ||
list_dart_files.py | ||
list_files.py | ||
make_bundle_unittest.py | ||
make_version.py | ||
only_in_release_mode.py | ||
patch_sdk.dart | ||
presubmit.sh | ||
promote.py | ||
publish_pkg.py | ||
revert.py | ||
safari_factory_reset.py | ||
set_ia32_sysroot.sh | ||
set_x64_sysroot.sh | ||
spec_parse.py | ||
status_clean.dart | ||
task_kill.py | ||
test.py | ||
utils.py | ||
VERSION | ||
write_revision_file.py | ||
write_version_file.py | ||
yaml2json.dart | ||
yaml2json.py |