Skip to content

Commit 8b53d26

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
observatory: replace unsupported [this] comment references with this.
Work towards dart-lang/dartdoc#3761 Sibling CL to https://dart-review.googlesource.com/c/sdk/+/365204 The analyzer has never recognized `[this]` as a valid doc comment reference (and the `comment_references` lint rule has similarly reported such reference attempts). dartdoc has its own algorithms for resolving comment references, which we are dismantling in favor of a single resolution, provided by the analyzer. We've also decided against adding support in the analyzer (see https://github.com/dart-lang/linter/issues/2079), so these reference attempts should be re-written. TEST=Nope Change-Id: Ie584a8338d4b203c4dce737769dbf2bd9094a42c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366881 Auto-Submit: Samuel Rawlins <[email protected]> Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 6eb6d4f commit 8b53d26

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

runtime/observatory/lib/src/service/object.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ abstract class ServiceObject implements M.ObjectRef {
320320
return obj;
321321
}
322322

323-
/// If [this] was created from a reference, load the full object
324-
/// from the service by calling [reload]. Else, return [this].
323+
/// If this [ServiceObject] was created from a reference, load the full
324+
/// object from the service by calling [reload]. Else, return this
325+
/// [ServiceObject].
325326
Future<ServiceObject> load() {
326327
if (loaded) {
327328
return new Future.value(this);
@@ -340,8 +341,8 @@ abstract class ServiceObject implements M.ObjectRef {
340341
return isolate!.invokeRpcNoUpgrade('getObject', params);
341342
}
342343

343-
/// Reload [this]. Returns a future which completes to [this] or
344-
/// an exception.
344+
/// Reload this [ServiceObject]. Returns a future which completes to this
345+
/// [ServiceObject] or an exception.
345346
Future<ServiceObject> reload({int count = kDefaultFieldLimit}) {
346347
// TODO(turnidge): Checking for a null id should be part of the
347348
// "immutable" check.
@@ -380,7 +381,8 @@ abstract class ServiceObject implements M.ObjectRef {
380381
return _inProgressReload!;
381382
}
382383

383-
/// Update [this] using [map] as a source. [map] can be a reference.
384+
/// Update this [ServiceObject] using [map] as a source. [map] can be a
385+
/// reference.
384386
void updateFromServiceMap(Map map) {
385387
assert(_isServiceMap(map));
386388

@@ -4349,7 +4351,7 @@ class Code extends HeapObject implements M.Code {
43494351
}
43504352
}
43514353

4352-
/// Reload [this]. Returns a future which completes to [this] or an
4354+
/// Reload this [Code]. Returns a future which completes to `this` or an
43534355
/// exception.
43544356
Future<ServiceObject> reload({int count = kDefaultFieldLimit}) {
43554357
assert(kind != null);
@@ -4501,7 +4503,7 @@ class Code extends HeapObject implements M.Code {
45014503
}
45024504
}
45034505

4504-
/// Returns true if [address] is contained inside [this].
4506+
/// Returns true if [address] is contained inside this [Code].
45054507
bool contains(int address) {
45064508
return (address >= startAddress) && (address < endAddress);
45074509
}

runtime/observatory/lib/utils.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ class Task {
289289

290290
Task(this.callback);
291291

292-
/// Queue [this] to run on the next Dart event queue pump. Does nothing
293-
/// if [this] is already queued.
292+
/// Queue this [Task] to run on the next Dart event queue pump. Does nothing
293+
/// if this [Task] is already queued.
294294
queue() {
295295
if (_timer != null) {
296296
// Already scheduled.

0 commit comments

Comments
 (0)