Skip to content

Commit

Permalink
Call report_failed_launch when VM fails to initialize (#3)
Browse files Browse the repository at this point in the history
This will cause the updater to not recommend that patch again.
  • Loading branch information
eseidel committed Oct 19, 2023
1 parent aba492e commit efe02b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shell/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ source_set("common") {
"//third_party/skia",
]

include_dirs = [ "//flutter/updater" ]

if (impeller_supports_rendering) {
sources += [
"snapshot_controller_impeller.cc",
Expand Down
5 changes: 5 additions & 0 deletions shell/common/shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#include "third_party/skia/include/utils/SkBase64.h"
#include "third_party/tonic/common/log.h"

#include "updater.h"

namespace flutter {

constexpr char kSkiaChannel[] = "flutter/skia";
Expand Down Expand Up @@ -162,6 +164,9 @@ std::unique_ptr<Shell> Shell::Create(
auto isolate_snapshot = DartSnapshot::IsolateSnapshotFromSettings(settings);
auto vm = DartVMRef::Create(settings, vm_snapshot, isolate_snapshot);
FML_CHECK(vm) << "Must be able to initialize the VM.";
if (!vm) {
shorebird_report_failed_launch();
}

// If the settings did not specify an `isolate_snapshot`, fall back to the
// one the VM was launched with.
Expand Down

0 comments on commit efe02b2

Please sign in to comment.