From 79a53b2ea2450032d0773fb4d97501dc8137be4f Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Wed, 4 Mar 2020 13:45:24 -0800 Subject: [PATCH] Roll Dart to df5036eb6e738c723339ed74c1e8ca93bea2570d. (#16936) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- third_party/tonic/dart_persistent_value.cc | 8 ++++++-- third_party/tonic/dart_wrappable.cc | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index e38daef67..57014c8cb 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS. # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '57462f9ca52000932d2ac82613808131650b440c', + 'dart_revision': 'df5036eb6e738c723339ed74c1e8ca93bea2570d', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index d6eea3efa..3e4479f66 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 3cc623c46feb1a616e6dc27b9168581f +Signature: c0d0a2e1f16f13bfd61d0ffb9d142ca7 UNUSED LICENSES: diff --git a/third_party/tonic/dart_persistent_value.cc b/third_party/tonic/dart_persistent_value.cc index 9ed6f70f3..3bc46505d 100644 --- a/third_party/tonic/dart_persistent_value.cc +++ b/third_party/tonic/dart_persistent_value.cc @@ -43,8 +43,12 @@ void DartPersistentValue::Clear() { return; } - DartIsolateScope scope(dart_state->isolate()); - Dart_DeletePersistentHandle(value_); + if (Dart_CurrentIsolateGroup()) { + Dart_DeletePersistentHandle(value_); + } else { + DartIsolateScope scope(dart_state->isolate()); + Dart_DeletePersistentHandle(value_); + } dart_state_.reset(); value_ = nullptr; } diff --git a/third_party/tonic/dart_wrappable.cc b/third_party/tonic/dart_wrappable.cc index 4ebfda7e1..d0906646f 100644 --- a/third_party/tonic/dart_wrappable.cc +++ b/third_party/tonic/dart_wrappable.cc @@ -64,7 +64,7 @@ void DartWrappable::ClearDartWrapper() { TONIC_CHECK(!LogIfError(Dart_SetNativeInstanceField(wrapper, kPeerIndex, 0))); TONIC_CHECK( !LogIfError(Dart_SetNativeInstanceField(wrapper, kWrapperInfoIndex, 0))); - Dart_DeleteWeakPersistentHandle(Dart_CurrentIsolate(), dart_wrapper_); + Dart_DeleteWeakPersistentHandle(dart_wrapper_); dart_wrapper_ = nullptr; this->ReleaseDartWrappableReference(); } -- GitLab