From eec99f4f0b8bba8ce2069b98c24fa3a2e11eda32 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 25 Apr 2022 15:53:32 +0000 Subject: [PATCH] [core libs] add dart:developer, dart:js_util, and dart:wasm to the set of validated libraries Change-Id: Id54af09f7b7559c5eb751db822aba8cd6b413559 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241160 Reviewed-by: Jonas Termansen Reviewed-by: Lasse Nielsen Commit-Queue: Devon Carew --- sdk/lib/developer/timeline.dart | 3 +++ sdk/lib/js_util/js_util.dart | 10 ++++++++-- tools/bots/test_matrix.json | 19 +++++++++++-------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/sdk/lib/developer/timeline.dart b/sdk/lib/developer/timeline.dart index 9dccd2250a6..a9990a31465 100644 --- a/sdk/lib/developer/timeline.dart +++ b/sdk/lib/developer/timeline.dart @@ -4,6 +4,9 @@ part of dart.developer; +// Examples can assume: +// void doSomething() {} + const bool _hasTimeline = const bool.fromEnvironment("dart.developer.timeline", defaultValue: true); diff --git a/sdk/lib/js_util/js_util.dart b/sdk/lib/js_util/js_util.dart index d0db6095e15..081bcb88ed7 100644 --- a/sdk/lib/js_util/js_util.dart +++ b/sdk/lib/js_util/js_util.dart @@ -17,6 +17,10 @@ import 'dart:async' show Completer; import 'dart:_js_helper' show convertDartClosureToJS, assertInterop, assertInteropArgs; +// Examples can assume: +// class JS { const JS(); } +// class Promise {} + /// Recursively converts a JSON-like collection to JavaScript compatible /// representation. /// @@ -305,9 +309,11 @@ class NullRejectionException implements Exception { /// @JS() /// external Promise get threePromise; // Resolves to 3 /// -/// final Future threeFuture = promiseToFuture(threePromise); +/// void main() async { +/// final Future threeFuture = promiseToFuture(threePromise); /// -/// final three = await threeFuture; // == 3 +/// final three = await threeFuture; // == 3 +/// } /// ``` Future promiseToFuture(Object jsPromise) { final completer = Completer(); diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json index 459362cfddc..7bab85127a6 100644 --- a/tools/bots/test_matrix.json +++ b/tools/bots/test_matrix.json @@ -3682,14 +3682,17 @@ "script": "out/ReleaseX64/dart-sdk/bin/dart", "arguments": [ "tools/verify_docs/bin/verify_docs.dart", - "sdk/lib/_http", - "sdk/lib/_internal", - "sdk/lib/cli", - "sdk/lib/convert", - "sdk/lib/ffi", - "sdk/lib/js", - "sdk/lib/math", - "sdk/lib/mirrors" + "dart:_http", + "dart:_internal", + "dart:cli", + "dart:convert", + "dart:developer", + "dart:ffi", + "dart:js", + "dart:js_util", + "dart:math", + "dart:mirrors", + "dart:wasm" ] }, {