Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 2180553002: Converted Observatory source-link & script-ref elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Converted Observatory source-link & script-ref elements Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of service; 5 part of service;
6 6
7 // Some value smaller than the object ring, so requesting a large array 7 // Some value smaller than the object ring, so requesting a large array
8 // doesn't result in an expired ref because the elements lapped it in the 8 // doesn't result in an expired ref because the elements lapped it in the
9 // object ring. 9 // object ring.
10 const int kDefaultFieldLimit = 100; 10 const int kDefaultFieldLimit = 100;
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 ServiceObject getFromMap(ObservableMap map); 419 ServiceObject getFromMap(ObservableMap map);
420 } 420 }
421 421
422 abstract class Location { 422 abstract class Location {
423 Script get script; 423 Script get script;
424 int get tokenPos; 424 int get tokenPos;
425 } 425 }
426 426
427 /// A [SourceLocation] represents a location or range in the source code. 427 /// A [SourceLocation] represents a location or range in the source code.
428 class SourceLocation extends ServiceObject implements Location, 428 class SourceLocation extends ServiceObject implements Location,
429 M.SourceLocation { 429 M.SourceLocation {
430 Script script; 430 Script script;
431 int tokenPos; 431 int tokenPos;
432 int endTokenPos; 432 int endTokenPos;
433 433
434 Future<int> getLine() async { 434 Future<int> getLine() async {
435 await script.load(); 435 await script.load();
436 return script.tokenToLine(tokenPos); 436 return script.tokenToLine(tokenPos);
437 } 437 }
438 438
439 Future<int> getColumn() async { 439 Future<int> getColumn() async {
(...skipping 3695 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 var v = list[i]; 4135 var v = list[i];
4136 if ((v is ObservableMap) && _isServiceMap(v)) { 4136 if ((v is ObservableMap) && _isServiceMap(v)) {
4137 list[i] = owner.getFromMap(v); 4137 list[i] = owner.getFromMap(v);
4138 } else if (v is ObservableList) { 4138 } else if (v is ObservableList) {
4139 _upgradeObservableList(v, owner); 4139 _upgradeObservableList(v, owner);
4140 } else if (v is ObservableMap) { 4140 } else if (v is ObservableMap) {
4141 _upgradeObservableMap(v, owner); 4141 _upgradeObservableMap(v, owner);
4142 } 4142 }
4143 } 4143 }
4144 } 4144 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/repositories/script.dart ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698