mirror of
https://github.com/dart-lang/sdk
synced 2024-10-01 19:14:49 +00:00
[dart:developer] Improve documentation of Service.getIsolateId and Service.getObjectId
This CL addresses https://dart-review.googlesource.com/c/sdk/+/317220/comment/7e05218f_882e21cd/ CoreLibraryReviewExempt: This CL does not change any APIs, it just adds an @Since annotation to a method. Change-Id: I4187c50498668553806bb2eee6584114363b417a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320900 Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Derek Xu <derekx@google.com>
This commit is contained in:
parent
39f50a9dae
commit
f6bc011b37
|
@ -18,6 +18,12 @@
|
|||
|
||||
### Libraries
|
||||
|
||||
#### `dart:developer`
|
||||
|
||||
- Deprecated the `Service.getIsolateID` method.
|
||||
- Added `getIsolateId` method to `Service`.
|
||||
- Added `getObjectId` method to `Service`.
|
||||
|
||||
#### `dart:io`
|
||||
|
||||
- **Breaking change** [#53005][]: The headers returned by
|
||||
|
|
|
@ -26,7 +26,9 @@ Future testeeMain() async {
|
|||
childIsolate = await iso.Isolate.spawn(spawnEntry, 0);
|
||||
// Assign the id for this isolate and it's child to strings so they can
|
||||
// be read by the tester.
|
||||
// ignore: sdk_version_since
|
||||
selfId = Service.getIsolateId(iso.Isolate.current)!;
|
||||
// ignore: sdk_version_since
|
||||
childId = Service.getIsolateId(childIsolate)!;
|
||||
debugger();
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
/// {@category Core}
|
||||
library dart.developer;
|
||||
|
||||
import 'dart:_internal' show checkNotNullable;
|
||||
import 'dart:_internal' show checkNotNullable, Since;
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:convert';
|
||||
|
|
|
@ -102,6 +102,7 @@ final class Service {
|
|||
///
|
||||
/// Returns null if the running Dart environment does not support the service
|
||||
/// protocol.
|
||||
@Since('3.2')
|
||||
static String? getIsolateId(Isolate isolate) {
|
||||
// TODO: When NNBD is complete, delete the following line.
|
||||
ArgumentError.checkNotNull(isolate, 'isolate');
|
||||
|
|
Loading…
Reference in a new issue