From b96edf5b9d282282610fdbf469726ca3d50aaf45 Mon Sep 17 00:00:00 2001 From: Alexander Markov Date: Tue, 15 Jan 2019 15:26:20 -0800 Subject: [PATCH] Cleanup Dart sticky errors API and roll tonic to 4634b29a24ccfc0fcfafcc8196ef30131185ad88 (flutter/engine#7492) This PR prepares Flutter engine for the cleanup of Dart API Dart_GetStickyError/Dart_SetStickyError/Dart_HasStickyError. --- DEPS | 2 +- engine/src/flutter/runtime/dart_isolate.cc | 15 +-------------- engine/src/flutter/runtime/dart_vm.cc | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/DEPS b/DEPS index b5f10888e2..08cbba8c63 100644 --- a/DEPS +++ b/DEPS @@ -125,7 +125,7 @@ deps = { # and not have to specific specific hashes. 'src/third_party/tonic': - Var('fuchsia_git') + '/tonic' + '@' + '5c9c2b63091ffd6000d44a3b5ff86e4f349e6978', + Var('fuchsia_git') + '/tonic' + '@' + '4634b29a24ccfc0fcfafcc8196ef30131185ad88', 'src/third_party/benchmark': Var('fuchsia_git') + '/third_party/benchmark' + '@' + '21f1eb3fe269ea43eba862bf6b699cde46587ade', diff --git a/engine/src/flutter/runtime/dart_isolate.cc b/engine/src/flutter/runtime/dart_isolate.cc index c3a0a4c803..c7c81880bf 100644 --- a/engine/src/flutter/runtime/dart_isolate.cc +++ b/engine/src/flutter/runtime/dart_isolate.cc @@ -21,7 +21,6 @@ #include "third_party/tonic/dart_class_provider.h" #include "third_party/tonic/dart_message_handler.h" #include "third_party/tonic/dart_state.h" -#include "third_party/tonic/dart_sticky_error.h" #include "third_party/tonic/file_loader/file_loader.h" #include "third_party/tonic/scopes/dart_api_scope.h" #include "third_party/tonic/scopes/dart_isolate_scope.h" @@ -700,19 +699,7 @@ DartIsolate::CreateDartVMAndEmbedderObjectPair( // |Dart_IsolateShutdownCallback| void DartIsolate::DartIsolateShutdownCallback( - std::shared_ptr* embedder_isolate) { - if (!tonic::DartStickyError::IsSet()) { - return; - } - - tonic::DartApiScope api_scope; - Dart_Handle sticky_error = Dart_GetStickyError(); - if (!Dart_IsFatalError(sticky_error)) { - FML_LOG(ERROR) << "Isolate " << tonic::StdStringFromDart(Dart_DebugName()) - << " exited with an error"; - FML_CHECK(tonic::LogIfError(sticky_error)); - } -} + std::shared_ptr* embedder_isolate) {} // |Dart_IsolateCleanupCallback| void DartIsolate::DartIsolateCleanupCallback( diff --git a/engine/src/flutter/runtime/dart_vm.cc b/engine/src/flutter/runtime/dart_vm.cc index 76613f6e4a..795a424bb9 100644 --- a/engine/src/flutter/runtime/dart_vm.cc +++ b/engine/src/flutter/runtime/dart_vm.cc @@ -27,7 +27,6 @@ #include "third_party/tonic/converter/dart_converter.h" #include "third_party/tonic/dart_class_library.h" #include "third_party/tonic/dart_class_provider.h" -#include "third_party/tonic/dart_sticky_error.h" #include "third_party/tonic/file_loader/file_loader.h" #include "third_party/tonic/logging/dart_error.h" #include "third_party/tonic/scopes/dart_api_scope.h"