Chromium Code Reviews| 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; |