mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Check if invocation of a closure failed due to a compilation error
This is a fix for bug #1325. The test framework is running the test code as a microtask using DartInvokeAppClosure. If the test causes a compilation error, the test framework Dart code can not catch it. The invocation in sky_shell will return a compilation error handle. The sky_shell process will not shut down, and the test framework will hang. This change will cause sky_shell to shut down on a compilation error in the test microtask.
This commit is contained in:
parent
d8046818a4
commit
fbc0a696dd
@ -21,8 +21,10 @@ bool DartInvokeAppClosure(Dart_Handle closure,
|
||||
int number_of_arguments,
|
||||
Dart_Handle* arguments) {
|
||||
TRACE_EVENT0("sky", "DartInvoke::DartInvokeAppClosure");
|
||||
return LogIfError(
|
||||
Dart_InvokeClosure(closure, number_of_arguments, arguments));
|
||||
Dart_Handle handle = Dart_InvokeClosure(closure, number_of_arguments, arguments);
|
||||
bool result = LogIfError(handle);
|
||||
CHECK(!Dart_IsCompilationError(handle));
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace blink
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user