From a5e4e34bbc4695605fc932e206383d66d5be48f2 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Sat, 24 Feb 2018 10:21:40 -0800 Subject: [PATCH] Re-enable Dart_TimelineGetMicros on init on macOS (flutter/engine#4712) Previously, a call to Dart_TimelineGetMicros() before a call to Dart_Initialize() resulted in a crash. This was fixed in dart-lang/sdk@7434bcad57b567c4b62d48b11b99c323cb245d66. Related: * flutter/flutter#4006: SkyShell.app on Mac crashes on startup * dart-lang/sdk#26486: [dart_tools_api.h] Dart_TimelineGetMicros crashes on Mac if called before Dart_Initialize --- .../src/flutter/shell/platform/darwin/common/platform_mac.mm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm b/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm index 4504838de0..5af35a430b 100644 --- a/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm +++ b/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm @@ -34,11 +34,7 @@ class EmbedderState { EmbedderState(std::string icu_data_path, std::string application_library_path, std::string bundle_path) { -#if TARGET_OS_IPHONE - // This calls crashes on MacOS because we haven't run Dart_Initialize yet. - // See https://github.com/flutter/flutter/issues/4006 blink::engine_main_enter_ts = Dart_TimelineGetMicros(); -#endif FXL_DCHECK([NSThread isMainThread]) << "Embedder initialization must occur on the main platform thread";