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

Unified Diff: lib/src/isolate.dart

Issue 1929063002: pkg/vm_service_client: add getSourceReport to VMServiceReference (Closed) Base URL: https://github.com/dart-lang/vm_service_client.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/script.dart » ('j') | lib/src/script.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/isolate.dart
diff --git a/lib/src/isolate.dart b/lib/src/isolate.dart
index 53fa415941f91ec47958b5681d0c0d77349e8493..5d2eac3e514a2cfc270b56eb814ca641d97e737b 100644
--- a/lib/src/isolate.dart
+++ b/lib/src/isolate.dart
@@ -15,7 +15,9 @@ import 'exceptions.dart';
import 'library.dart';
import 'pause_event.dart';
import 'scope.dart';
+import 'script.dart';
import 'sentinel.dart';
+import 'source_report.dart';
import 'stack.dart';
import 'stream_manager.dart';
import 'utils.dart';
@@ -342,6 +344,42 @@ class VMIsolateRef {
return _scope.sendRequest(method, params);
}
+ Future<VMSourceReport> getSourceReport(
+ {bool includeCoverageReport,
+ bool includePossibleBreakpoints,
+ VMScriptRef script,
+ int tokenPos,
+ int endTokenPos,
+ bool forceCompile}) async {
+
nweiz 2016/04/28 19:44:00 Nit: Remove this line.
kevmoo 2016/04/28 20:26:05 Done.
+ var reports = <String>[];
+ if (includeCoverageReport == true) {
+ reports.add('Coverage');
+ }
+
+ if (includePossibleBreakpoints == true) {
+ reports.add('PossibleBreakpoints');
+ }
+
+ var params = <String, dynamic>{'reports': reports};
+
+ if (script != null) {
+ params['scriptId'] = getScriptId(script);
+ }
+
+ if (tokenPos != null) {
+ params['tokenPos'] = tokenPos;
+ }
+
+ if (endTokenPos != null) {
+ params['endTokenPos'] = endTokenPos;
+ }
+
+ var json = await _scope.sendRequest('getSourceReport', params);
+
+ return newSourceReport(_scope, json);
+ }
+
bool operator ==(other) => other is VMIsolateRef &&
other._scope.isolateId == _scope.isolateId;
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/script.dart » ('j') | lib/src/script.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698