Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for Dart VM initialization before the letting the service isolat…
…e constructor access the VM object. (flutter#6028) The service isolate creation callback may occur on a background thread before the call the Dart_Initialize within the DartVM construtor can finish. We store pointers to various snapshots within the DartVM object. These snapshots are necessary for to successfully create the service isolate. The isolate creation callback access the global object within the ForProcessIfInitialized method. This method can return null if the VM object has not been initialized. This leads to the service protocol failing to start in a non-deterministic manner. This patch moves the creation and access of the DartVM object within a critical section.
- Loading branch information