|
Dart: Better handle leak checks. close() is async.
This change adds tracking of MojoHandle creation and closing in Debug
mode, and makes it possible to emit a log of leaked handles on Mojo app
shutdown. If any handles are leaked, causing the finalizer to need to
close a handle, an error message is emitted with LOG(ERROR). All of the
handles created by an isolate are also closed on an unhandled exception.
This should prevent hangs.
To aid tracking handles, close() now returns a Future in most cases.
This is because a call to close() will generally send a command to the
handle watcher, and so the actual close() of the underlying handle
happens asynchronously. In particular when the future for a call to
close() on an Application resolves, we should be able to do:
assert(MojoHandle.reportLeakedHandles());
This change also fixes analyzer warnings and removes the special case
to ignore warnings from the analyzer's wrapper script.
BUG=
R=erg@chromium.org, sky@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/b7959afdc4fa4acb65c67cafa6985394633138c8
Total comments: 3
Total comments: 13
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+310 lines, -309 lines) |
Patch |
 |
M |
examples/dart/console_example/main.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/dart/hello_world/hello/main.dart
|
View
|
1
2
3
4
5
6
|
2 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/dart/hello_world/world/main.dart
|
View
|
1
2
3
4
5
6
|
2 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/dart/wget/main.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/apptest/apptest/apptest.dart
|
View
|
1
2
3
4
5
6
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/dart_controller.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/isolate_data.h
|
View
|
1
2
3
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/mojo_natives.cc
|
View
|
1
2
3
4
5
6
|
5 chunks |
+28 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/test/run_dart_tests.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/test/validation_unittest.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/bindings_generation_test.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+17 lines, -0 lines |
0 comments
|
Download
|
 |
D |
mojo/dart/test/interface_test.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -195 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/validation_test.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/application.dart
|
View
|
|
3 chunks |
+13 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/application_connection.dart
|
View
|
|
2 chunks |
+14 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/codec.dart
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/event_stream.dart
|
View
|
|
4 chunks |
+39 lines, -16 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/handle.dart
|
View
|
1
2
3
4
|
3 chunks |
+69 lines, -12 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/handle_watcher.dart
|
View
|
|
10 chunks |
+48 lines, -32 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/stub.dart
|
View
|
|
5 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
services/dart/dart_apptests/main.dart
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
services/dart/test/echo/main.dart
|
View
|
1
2
3
4
5
6
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
services/dart/test/pingpong/main.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
services/dart/test/pingpong_target/main.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
Total messages: 17 (2 generated)
|