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
5
#include "
tonic/scopes/dart_isolate_scope.h
"
6
7
namespace
tonic
{
8
9
DartIsolateScope::DartIsolateScope
(Dart_Isolate isolate) {
10
isolate_ = isolate;
11
previous_ = Dart_CurrentIsolate();
12
if
(previous_ == isolate_)
13
return
;
14
if
(previous_)
15
Dart_ExitIsolate();
16
Dart_EnterIsolate(isolate_);
17
}
18
19
DartIsolateScope::~DartIsolateScope
() {
20
Dart_Isolate current = Dart_CurrentIsolate();
21
TONIC_DCHECK
(!current || current == isolate_);
22
if
(previous_ == isolate_)
23
return
;
24
if
(current)
25
Dart_ExitIsolate();
26
if
(previous_)
27
Dart_EnterIsolate(previous_);
28
}
29
30
}
// namespace tonic
tonic::DartIsolateScope::~DartIsolateScope
~DartIsolateScope()
Definition
dart_isolate_scope.cc:19
tonic::DartIsolateScope::DartIsolateScope
DartIsolateScope(Dart_Isolate isolate)
Definition
dart_isolate_scope.cc:9
dart_isolate_scope.h
tonic
Definition
image_filter.h:15
TONIC_DCHECK
#define TONIC_DCHECK
Definition
macros.h:32
third_party
tonic
scopes
dart_isolate_scope.cc
Generated on Thu Nov 6 2025 16:11:30 for Flutter Engine by
1.9.8