Try to deflake service isolate startup (flutter/engine#35950)
This commit is contained in:
@@ -157,18 +157,6 @@ bool DartServiceIsolate::Startup(std::string server_ip,
|
||||
result = Dart_SetNativeResolver(library, GetNativeFunction, GetSymbol);
|
||||
SHUTDOWN_ON_ERROR(result);
|
||||
|
||||
// Make runnable.
|
||||
Dart_ExitScope();
|
||||
Dart_ExitIsolate();
|
||||
*error = Dart_IsolateMakeRunnable(isolate);
|
||||
if (*error) {
|
||||
Dart_EnterIsolate(isolate);
|
||||
Dart_ShutdownIsolate();
|
||||
return false;
|
||||
}
|
||||
Dart_EnterIsolate(isolate);
|
||||
Dart_EnterScope();
|
||||
|
||||
library = Dart_RootLibrary();
|
||||
SHUTDOWN_ON_ERROR(library);
|
||||
|
||||
@@ -202,6 +190,19 @@ bool DartServiceIsolate::Startup(std::string server_ip,
|
||||
library, Dart_NewStringFromCString("_enableServicePortFallback"),
|
||||
Dart_NewBoolean(enable_service_port_fallback));
|
||||
SHUTDOWN_ON_ERROR(result);
|
||||
|
||||
// Make runnable.
|
||||
Dart_ExitScope();
|
||||
Dart_ExitIsolate();
|
||||
*error = Dart_IsolateMakeRunnable(isolate);
|
||||
if (*error) {
|
||||
Dart_EnterIsolate(isolate);
|
||||
Dart_ShutdownIsolate();
|
||||
return false;
|
||||
}
|
||||
Dart_EnterIsolate(isolate);
|
||||
Dart_EnterScope();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user