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

Unified Diff: runtime/observatory/lib/src/elements/debugger.dart

Issue 2980733003: Introduced support for external services registration in the ServiceProtocol (Closed)
Patch Set: Address comments Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/debugger.dart
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
index 30e972630da03de64f789e1be9bc9b2c23297283..5cda2a54ae19c397e3fc8f4a902c11a038427f9d 100644
--- a/runtime/observatory/lib/src/elements/debugger.dart
+++ b/runtime/observatory/lib/src/elements/debugger.dart
@@ -16,6 +16,7 @@ import 'package:observatory/debugger.dart';
import 'package:observatory/event.dart';
import 'package:observatory/models.dart' as M;
import 'package:observatory/service.dart' as S;
+import 'package:observatory/repositories.dart' as R;
import 'package:observatory/src/elements/function_ref.dart';
import 'package:observatory/src/elements/helpers/any_ref.dart';
import 'package:observatory/src/elements/helpers/nav_bar.dart';
@@ -439,7 +440,10 @@ class RewindCommand extends DebuggerCommand {
}
class ReloadCommand extends DebuggerCommand {
- ReloadCommand(Debugger debugger) : super(debugger, 'reload', []);
+ final M.IsolateRepository _isolates;
+
+ ReloadCommand(Debugger debugger, this._isolates)
+ : super(debugger, 'reload', []);
Future run(List<String> args) async {
try {
@@ -447,7 +451,12 @@ class ReloadCommand extends DebuggerCommand {
debugger.console.print('reload expects no arguments');
return;
}
- await debugger.isolate.reloadSources();
+ if (_isolates.reloadSourcesServices.isEmpty) {
+ await _isolates.reloadSources(debugger.isolate);
+ } else {
+ await _isolates.reloadSources(debugger.isolate,
+ service: _isolates.reloadSourcesServices.first);
+ }
debugger.console.print('reload complete');
await debugger.refreshStack();
} on S.ServerRpcException catch (e) {
@@ -1461,7 +1470,7 @@ class ObservatoryDebugger extends Debugger {
new LogCommand(this),
new PauseCommand(this),
new PrintCommand(this),
- new ReloadCommand(this),
+ new ReloadCommand(this, new R.IsolateRepository(this.isolate.vm)),
new RefreshCommand(this),
new RewindCommand(this),
new SetCommand(this),
« no previous file with comments | « runtime/observatory/lib/src/elements/css/shared.css ('k') | runtime/observatory/lib/src/elements/helpers/nav_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698