Index: mojo/dart/embedder/test/dart_to_cpp_tests.cc |
diff --git a/mojo/dart/embedder/test/dart_to_cpp_tests.cc b/mojo/dart/embedder/test/dart_to_cpp_tests.cc |
index 40ed395db25a6833676358fdead2a65bcd5a16e9..825659f02d3cf6b0b59eb99eec8e766babd7b467 100644 |
--- a/mojo/dart/embedder/test/dart_to_cpp_tests.cc |
+++ b/mojo/dart/embedder/test/dart_to_cpp_tests.cc |
@@ -272,8 +272,12 @@ class DartToCppTest : public testing::Test { |
base::MessageLoop loop; |
base::RunLoop run_loop_; |
- static void UnhandledExceptionCallback(bool* exception, Dart_Handle error) { |
+ static void UnhandledExceptionCallback(bool* exception, |
+ int64_t* closed_handles, |
+ Dart_Handle error, |
+ int64_t count) { |
*exception = true; |
+ *closed_handles = count; |
} |
static bool GenerateEntropy(uint8_t* buffer, intptr_t length) { |
@@ -287,6 +291,7 @@ class DartToCppTest : public testing::Test { |
const char** arguments, |
int arguments_count, |
bool* unhandled_exception, |
+ int64_t* closed_handles, |
char** error) { |
base::FilePath path; |
PathService::Get(base::DIR_SOURCE_ROOT, &path); |
@@ -307,8 +312,8 @@ class DartToCppTest : public testing::Test { |
config->strict_compilation = true; |
config->script_uri = path.AsUTF8Unsafe(); |
config->package_root = package_root.AsUTF8Unsafe(); |
- config->callbacks.exception = |
- base::Bind(&UnhandledExceptionCallback, unhandled_exception); |
+ config->callbacks.exception = base::Bind( |
+ &UnhandledExceptionCallback, unhandled_exception, closed_handles); |
config->entropy = GenerateEntropy; |
config->handle = handle; |
config->SetVmFlags(arguments, arguments_count); |
@@ -336,14 +341,10 @@ class DartToCppTest : public testing::Test { |
DartControllerConfig config; |
char* error; |
bool unhandled_exception = false; |
+ int64_t closed_handles; |
InitializeDartConfig( |
- &config, |
- test, |
- dart_side_request.PassMessagePipe().release().value(), |
- nullptr, |
- 0, |
- &unhandled_exception, |
- &error); |
+ &config, test, dart_side_request.PassMessagePipe().release().value(), |
+ nullptr, 0, &unhandled_exception, &closed_handles, &error); |
dart_thread->Start(); |
dart_thread->message_loop()->PostTask(FROM_HERE, |