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

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: changelog oops 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..17d4073969d3f42fd302bb89ed6abaadfbb50984 100644
--- a/lib/src/isolate.dart
+++ b/lib/src/isolate.dart
@@ -16,6 +16,7 @@ import 'library.dart';
import 'pause_event.dart';
import 'scope.dart';
import 'sentinel.dart';
+import 'source_report.dart';
import 'stack.dart';
import 'stream_manager.dart';
import 'utils.dart';
@@ -342,6 +343,38 @@ class VMIsolateRef {
return _scope.sendRequest(method, params);
}
+ /// Generates a set of reports tied to source locations in an isolate.
nweiz 2016/04/29 00:52:43 It's confusing that this says "a set of reports" b
kevmoo 2016/04/29 23:36:54 Acknowledged.
+ ///
+ /// Set [includeCoverageReport] to `true` to include code coverage
+ /// information.
nweiz 2016/04/29 00:52:43 We don't usually talk about "setting" parameters.
kevmoo 2016/04/29 23:36:54 Done.
+ ///
+ /// Set [includePossibleBreakpoints] to `true` to provide a list of token
+ /// positions which correspond to possible breakpoints.
nweiz 2016/04/29 00:52:43 "Provide" is usually refers to the caller providin
kevmoo 2016/04/29 23:36:54 Done.
+ ///
+ /// Set [forceCompilation] to `true` to force compilation of all functions in
nweiz 2016/04/29 00:52:43 The parameter below is "forceCompile", not "forceC
kevmoo 2016/04/29 23:36:53 Done.
+ /// the range of the report.
nweiz 2016/04/29 00:52:43 Nit: Don't add unnecessary newlines within paragra
kevmoo 2016/04/29 23:36:53 Done.
+ /// Forcing compilation can cause a compilation error, which could terminate
+ /// the running Dart program.
nweiz 2016/04/29 00:52:43 Explain what the difference is between forcing com
kevmoo 2016/05/03 22:34:50 Done.
+ Future<VMSourceReport> getSourceReport(
+ {bool includeCoverageReport,
+ bool includePossibleBreakpoints,
+ bool forceCompile}) async {
nweiz 2016/04/29 00:52:43 Give these default values and don't use "== true"
kevmoo 2016/04/29 23:36:54 Done.
+ var reports = <String>[];
+ if (includeCoverageReport == true) {
+ reports.add('Coverage');
+ }
+
+ if (includePossibleBreakpoints == true) {
+ reports.add('PossibleBreakpoints');
+ }
+
+ var params = <String, dynamic>{'reports': reports};
nweiz 2016/04/29 00:52:43 This map literal has values, so it doesn't need to
kevmoo 2016/04/29 23:36:54 Done.
+
nweiz 2016/04/29 00:52:43 Nit: You probably don't need every line of code in
kevmoo 2016/04/29 23:36:54 Acknowledged.
+ 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