Flutter Engine
dart_isolate_group_data.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 "flutter/runtime/dart_isolate_group_data.h"
6 
7 #include "flutter/runtime/dart_snapshot.h"
8 
9 namespace flutter {
10 
12  const Settings& settings,
13  fml::RefPtr<const DartSnapshot> isolate_snapshot,
14  std::string advisory_script_uri,
15  std::string advisory_script_entrypoint,
16  const ChildIsolatePreparer& child_isolate_preparer,
17  const fml::closure& isolate_create_callback,
18  const fml::closure& isolate_shutdown_callback)
19  : settings_(settings),
20  isolate_snapshot_(isolate_snapshot),
21  advisory_script_uri_(advisory_script_uri),
22  advisory_script_entrypoint_(advisory_script_entrypoint),
23  child_isolate_preparer_(child_isolate_preparer),
24  isolate_create_callback_(isolate_create_callback),
25  isolate_shutdown_callback_(isolate_shutdown_callback) {
26  FML_DCHECK(isolate_snapshot_) << "Must contain a valid isolate snapshot.";
27 }
28 
30 
32  return settings_;
33 }
34 
36  const {
37  return isolate_snapshot_;
38 }
39 
40 const std::string& DartIsolateGroupData::GetAdvisoryScriptURI() const {
41  return advisory_script_uri_;
42 }
43 
45  return advisory_script_entrypoint_;
46 }
47 
49  std::scoped_lock lock(child_isolate_preparer_mutex_);
50  return child_isolate_preparer_;
51 }
52 
54  return isolate_create_callback_;
55 }
56 
58  return isolate_shutdown_callback_;
59 }
60 
62  const ChildIsolatePreparer& value) {
63  std::scoped_lock lock(child_isolate_preparer_mutex_);
64  child_isolate_preparer_ = value;
65 }
66 
67 } // namespace flutter
void SetChildIsolatePreparer(const ChildIsolatePreparer &value)
Settings settings_
ChildIsolatePreparer GetChildIsolatePreparer() const
const fml::closure & GetIsolateShutdownCallback() const
#define FML_DCHECK(condition)
Definition: logging.h:86
const Settings & GetSettings() const
std::function< void()> closure
Definition: closure.h:14
uint8_t value
DartIsolateGroupData(const Settings &settings, fml::RefPtr< const DartSnapshot > isolate_snapshot, std::string advisory_script_uri, std::string advisory_script_entrypoint, const ChildIsolatePreparer &child_isolate_preparer, const fml::closure &isolate_create_callback, const fml::closure &isolate_shutdown_callback)
const fml::closure & GetIsolateCreateCallback() const
std::function< bool(DartIsolate *)> ChildIsolatePreparer
const std::string & GetAdvisoryScriptEntrypoint() const
const std::string & GetAdvisoryScriptURI() const
fml::RefPtr< const DartSnapshot > GetIsolateSnapshot() const