Skip to content

Commit d21897b

Browse files
a-sivacommit-bot@chromium.org
authored andcommitted
Revert "[ VM / Service ] Add setIsolatePauseMode RPC"
This reverts commit cad8a34. Reason for revert: broke the g3 cbuild, see cbuild logs (Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface') Original change's description: > [ VM / Service ] Add setIsolatePauseMode RPC > > Allows for service clients to set pause behaviors on a per-isolate > basis at runtime. setIsolatePauseMode is a more general version of > setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated. > > TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart > > Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580 > Commit-Queue: Ben Konyi <[email protected]> > Reviewed-by: Siva Annamalai <[email protected]> [email protected],[email protected],[email protected] Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Siva Annamalai <[email protected]>
1 parent d5086e4 commit d21897b

20 files changed

+15
-453
lines changed

pkg/dds/lib/src/dap/isolate_manager.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,7 @@ class IsolateManager {
581581
return;
582582
}
583583

584-
await service.setIsolatePauseMode(
585-
isolate.id!,
586-
exceptionPauseMode: _exceptionPauseMode,
587-
);
584+
await service.setExceptionPauseMode(isolate.id!, _exceptionPauseMode);
588585
}
589586

590587
/// Calls setLibraryDebuggable for all libraries in the given isolate based

pkg/dds/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
shelf_web_socket: ^1.0.0
2626
sse: ^4.0.0
2727
stream_channel: ^2.0.0
28-
vm_service: ^7.5.0
28+
vm_service: ^7.2.0
2929
web_socket_channel: ^2.0.0
3030

3131
dev_dependencies:

pkg/vm_service/CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Changelog
22

3-
## 7.5.0
4-
- Update to version `3.53` of the spec.
5-
- Added `setIsolatePauseMode` RPC.
6-
- Deprecated `setExceptionPauseMode` in favor of `setIsolatePauseMode`.
7-
83
## 7.4.0
94
- Update to version `3.52` of the spec.
105
- Added `lookupResolvedPackageUris` and `lookupPackageUris` RPCs and `UriList`

pkg/vm_service/java/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ src/org/dartlang/vm/service/consumer/RequestHeapSnapshotConsumer.java
3636
src/org/dartlang/vm/service/consumer/ResumeConsumer.java
3737
src/org/dartlang/vm/service/consumer/SetExceptionPauseModeConsumer.java
3838
src/org/dartlang/vm/service/consumer/SetFlagConsumer.java
39-
src/org/dartlang/vm/service/consumer/SetIsolatePauseModeConsumer.java
4039
src/org/dartlang/vm/service/consumer/SetLibraryDebuggableConsumer.java
4140
src/org/dartlang/vm/service/consumer/SetNameConsumer.java
4241
src/org/dartlang/vm/service/consumer/SetTraceClassAllocationConsumer.java
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=3.53
1+
version=3.52

pkg/vm_service/lib/src/vm_service.dart

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export 'snapshot_graph.dart'
2626
HeapSnapshotObjectNoData,
2727
HeapSnapshotObjectNullData;
2828

29-
const String vmServiceVersion = '3.53.0';
29+
const String vmServiceVersion = '3.52.0';
3030

3131
/// @optional
3232
const String optional = 'optional';
@@ -236,7 +236,6 @@ Map<String, List<String>> _methodReturnTypes = {
236236
'resume': const ['Success'],
237237
'setBreakpointState': const ['Breakpoint'],
238238
'setExceptionPauseMode': const ['Success'],
239-
'setIsolatePauseMode': const ['Success'],
240239
'setFlag': const ['Success', 'Error'],
241240
'setLibraryDebuggable': const ['Success'],
242241
'setName': const ['Success'],
@@ -1079,34 +1078,9 @@ abstract class VmServiceInterface {
10791078
///
10801079
/// This method will throw a [SentinelException] in the case a [Sentinel] is
10811080
/// returned.
1082-
@Deprecated('Use setIsolatePauseMode instead')
10831081
Future<Success> setExceptionPauseMode(
10841082
String isolateId, /*ExceptionPauseMode*/ String mode);
10851083

1086-
/// The `setIsolatePauseMode` RPC is used to control if or when an isolate
1087-
/// will pause due to a change in execution state.
1088-
///
1089-
/// The `shouldPauseOnExit` parameter specify whether the target isolate
1090-
/// should pause on exit.
1091-
///
1092-
/// The `setExceptionPauseMode` RPC is used to control if an isolate pauses
1093-
/// when an exception is thrown.
1094-
///
1095-
/// mode | meaning
1096-
/// ---- | -------
1097-
/// None | Do not pause isolate on thrown exceptions
1098-
/// Unhandled | Pause isolate on unhandled exceptions
1099-
/// All | Pause isolate on all thrown exceptions
1100-
///
1101-
/// If `isolateId` refers to an isolate which has exited, then the `Collected`
1102-
/// [Sentinel] is returned.
1103-
///
1104-
/// This method will throw a [SentinelException] in the case a [Sentinel] is
1105-
/// returned.
1106-
Future<Success> setIsolatePauseMode(String isolateId,
1107-
{/*ExceptionPauseMode*/ String? exceptionPauseMode,
1108-
bool? shouldPauseOnExit});
1109-
11101084
/// The `setFlag` RPC is used to set a VM flag at runtime. Returns an error if
11111085
/// the named flag does not exist, the flag may not be set at runtime, or the
11121086
/// value is of the wrong type for the flag.
@@ -1127,7 +1101,6 @@ abstract class VmServiceInterface {
11271101
/// provided value. If set to false when the profiler is already running, the
11281102
/// profiler will be stopped but may not free its sample buffer depending on
11291103
/// platform limitations.
1130-
/// - Isolate pause settings will only be applied to newly spawned isolates.
11311104
///
11321105
/// See [Success].
11331106
///
@@ -1576,19 +1549,11 @@ class VmServerConnection {
15761549
);
15771550
break;
15781551
case 'setExceptionPauseMode':
1579-
// ignore: deprecated_member_use_from_same_package
15801552
response = await _serviceImplementation.setExceptionPauseMode(
15811553
params!['isolateId'],
15821554
params['mode'],
15831555
);
15841556
break;
1585-
case 'setIsolatePauseMode':
1586-
response = await _serviceImplementation.setIsolatePauseMode(
1587-
params!['isolateId'],
1588-
exceptionPauseMode: params['exceptionPauseMode'],
1589-
shouldPauseOnExit: params['shouldPauseOnExit'],
1590-
);
1591-
break;
15921557
case 'setFlag':
15931558
response = await _serviceImplementation.setFlag(
15941559
params!['name'],
@@ -2116,23 +2081,11 @@ class VmService implements VmServiceInterface {
21162081
'enable': enable
21172082
});
21182083

2119-
@Deprecated('Use setIsolatePauseMode instead')
21202084
@override
21212085
Future<Success> setExceptionPauseMode(
21222086
String isolateId, /*ExceptionPauseMode*/ String mode) =>
21232087
_call('setExceptionPauseMode', {'isolateId': isolateId, 'mode': mode});
21242088

2125-
@override
2126-
Future<Success> setIsolatePauseMode(String isolateId,
2127-
{/*ExceptionPauseMode*/ String? exceptionPauseMode,
2128-
bool? shouldPauseOnExit}) =>
2129-
_call('setIsolatePauseMode', {
2130-
'isolateId': isolateId,
2131-
if (exceptionPauseMode != null)
2132-
'exceptionPauseMode': exceptionPauseMode,
2133-
if (shouldPauseOnExit != null) 'shouldPauseOnExit': shouldPauseOnExit,
2134-
});
2135-
21362089
@override
21372090
Future<Response> setFlag(String name, String value) =>
21382091
_call('setFlag', {'name': name, 'value': value});

pkg/vm_service/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >-
33
A library to communicate with a service implementing the Dart VM
44
service protocol.
55
6-
version: 7.5.0
6+
version: 7.4.0
77

88
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service
99

pkg/vm_service/test/common/test_helper.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ class _ServiceTesterRunner {
277277
vm = await vmServiceConnectUri(serviceWebsocketAddress);
278278
print('Done loading VM');
279279
isolate = await getFirstIsolate(vm);
280+
print('Got first isolate');
280281
});
281282
});
282283

@@ -334,12 +335,14 @@ class _ServiceTesterRunner {
334335
if (event.kind == EventKind.kIsolateRunnable) {
335336
print(event.isolate!.name);
336337
vm = await service.getVM();
338+
//assert(vmIsolates.isNotEmpty);
337339
await subscription.cancel();
338340
await service.streamCancel(EventStreams.kIsolate);
339341
completer!.complete(event.isolate!);
340342
completer = null;
341343
}
342344
});
345+
343346
await service.streamListen(EventStreams.kIsolate);
344347

345348
// The isolate may have started before we subscribed.

pkg/vm_service/test/pause_on_exceptions_legacy_test.dart

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)