|
VM restart + shutdown fixes
This change add the ability to restart the vm through the service
protocol. All isolates are killed, and then the main isolate is
restarted cooperatively by the embedder.
This change also fixes the message handler to prevent it from
accidentally ignoring vm shutdown messages.
Previously, we would stop handling messages whenever we hit an error
(such as a compile error or an unhandled exception). This would leave
shutdown requests sitting the oob queue, neglected.
We now process *all* oob requests, up to the first shutdown request.
When we hit a shutdown request, we clear the oob queue and process no
more messages.
To make all of this work, we had to change the return value of
HandleMessage from bool to a new enum type, allowing the message
handler to distinguish *normal* error cases from the more rarified
shutdown and restart cases.
R=johnmccutchan@google.com, zra@google.com
Committed: https://github.com/dart-lang/sdk/commit/0d501ad53d1be5689934ceb8a38d9cde39399eb8
Total comments: 20
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+807 lines, -316 lines) |
Patch |
|
M |
runtime/bin/main.cc
|
View
|
1
2
3
|
12 chunks |
+160 lines, -128 lines |
0 comments
|
Download
|
|
M |
runtime/include/dart_api.h
|
View
|
|
2 chunks |
+15 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/observatory/lib/src/elements/debugger.dart
|
View
|
1
2
|
12 chunks |
+115 lines, -22 lines |
0 comments
|
Download
|
|
M |
runtime/observatory/lib/src/elements/debugger.html
|
View
|
1
2
|
1 chunk |
+21 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/observatory/lib/src/service/object.dart
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
A |
runtime/observatory/tests/service/vm_restart_test.dart
|
View
|
1
2
3
4
|
1 chunk |
+106 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/dart.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/dart_api_impl.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+12 lines, -3 lines |
0 comments
|
Download
|
|
M |
runtime/vm/debugger.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+11 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/vm/isolate.h
|
View
|
1
2
3
4
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
runtime/vm/isolate.cc
|
View
|
1
2
3
4
5
|
24 chunks |
+78 lines, -50 lines |
0 comments
|
Download
|
|
M |
runtime/vm/message_handler.h
|
View
|
1
2
3
4
|
4 chunks |
+16 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/vm/message_handler.cc
|
View
|
1
2
3
4
|
9 chunks |
+120 lines, -53 lines |
0 comments
|
Download
|
|
M |
runtime/vm/message_handler_test.cc
|
View
|
1
2
3
4
|
7 chunks |
+84 lines, -10 lines |
0 comments
|
Download
|
|
M |
runtime/vm/native_message_handler.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/native_message_handler.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.h
|
View
|
1
2
3
4
5
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+9 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/port_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/raw_object.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/service.cc
|
View
|
1
2
3
4
|
4 chunks |
+21 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/vm/service_isolate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/service_test.cc
|
View
|
1
|
16 chunks |
+20 lines, -20 lines |
0 comments
|
Download
|
Total messages: 9 (1 generated)
|