Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
dart_isolate_scope.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
7namespace tonic {
8
10 isolate_ = isolate;
11 previous_ = Dart_CurrentIsolate();
12 if (previous_ == isolate_)
13 return;
14 if (previous_)
16 Dart_EnterIsolate(isolate_);
17}
18
21 TONIC_DCHECK(!current || current == isolate_);
22 if (previous_ == isolate_)
23 return;
24 if (current)
26 if (previous_)
27 Dart_EnterIsolate(previous_);
28}
29
30} // namespace tonic
DartIsolateScope(Dart_Isolate isolate)
struct _Dart_Isolate * Dart_Isolate
Definition dart_api.h:88
DART_EXPORT Dart_Isolate Dart_CurrentIsolate(void)
DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate)
DART_EXPORT void Dart_ExitIsolate(void)
#define TONIC_DCHECK
Definition macros.h:32