Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
3d2668c3
E
engine
项目概览
qq_34031325
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3d2668c3
编写于
7月 09, 2019
作者:
B
Ben Konyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reland isolate group changes
This reverts commit
64b9eef5
.
上级
802bd151
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
38 addition
and
35 deletion
+38
-35
runtime/dart_isolate.cc
runtime/dart_isolate.cc
+12
-10
runtime/dart_isolate.h
runtime/dart_isolate.h
+4
-4
runtime/dart_vm.cc
runtime/dart_vm.cc
+7
-6
shell/platform/fuchsia/dart/dart_component_controller.cc
shell/platform/fuchsia/dart/dart_component_controller.cc
+2
-2
shell/platform/fuchsia/dart/dart_runner.cc
shell/platform/fuchsia/dart/dart_runner.cc
+11
-11
shell/platform/fuchsia/dart/service_isolate.cc
shell/platform/fuchsia/dart/service_isolate.cc
+2
-2
未找到文件。
runtime/dart_isolate.cc
浏览文件 @
3d2668c3
...
...
@@ -163,7 +163,7 @@ bool DartIsolate::Initialize(Dart_Isolate dart_isolate, bool is_root_isolate) {
}
auto
*
isolate_data
=
static_cast
<
std
::
shared_ptr
<
DartIsolate
>*>
(
Dart_IsolateData
(
dart_isolate
));
Dart_Isolate
Group
Data
(
dart_isolate
));
if
(
isolate_data
->
get
()
!=
this
)
{
return
false
;
}
...
...
@@ -174,7 +174,7 @@ bool DartIsolate::Initialize(Dart_Isolate dart_isolate, bool is_root_isolate) {
// We are entering a new scope (for the first time since initialization) and
// we want to restore the current scope to null when we exit out of this
// method. This balances the implicit Dart_EnterIsolate call made by
// Dart_CreateIsolate (which calls the Initialize).
// Dart_CreateIsolate
Group
(which calls the Initialize).
Dart_ExitIsolate
();
tonic
::
DartIsolateScope
scope
(
isolate
());
...
...
@@ -636,8 +636,8 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
return
service_isolate
->
isolate
();
}
// |Dart_IsolateCreateCallback|
Dart_Isolate
DartIsolate
::
DartIsolateCreateCallback
(
// |Dart_Isolate
Group
CreateCallback|
Dart_Isolate
DartIsolate
::
DartIsolate
Group
CreateCallback
(
const
char
*
advisory_script_uri
,
const
char
*
advisory_script_entrypoint
,
const
char
*
package_root
,
...
...
@@ -720,14 +720,16 @@ DartIsolate::CreateDartVMAndEmbedderObjectPair(
}
// Create the Dart VM isolate and give it the embedder object as the baton.
Dart_Isolate
isolate
=
Dart_CreateIsolate
(
Dart_Isolate
isolate
=
Dart_CreateIsolate
Group
(
advisory_script_uri
,
//
advisory_script_entrypoint
,
//
(
*
embedder_isolate
)
->
GetIsolateSnapshot
()
->
GetDataMapping
(),
(
*
embedder_isolate
)
->
GetIsolateSnapshot
()
->
GetInstructionsMapping
(),
(
*
embedder_isolate
)
->
GetSharedSnapshot
()
->
GetDataMapping
(),
(
*
embedder_isolate
)
->
GetSharedSnapshot
()
->
GetInstructionsMapping
(),
flags
,
embedder_isolate
.
get
(),
error
);
embedder_isolate
.
get
(),
// isolate_group_data
embedder_isolate
.
get
(),
// isolate_data
error
);
if
(
isolate
==
nullptr
)
{
FML_DLOG
(
ERROR
)
<<
*
error
;
...
...
@@ -775,10 +777,10 @@ void DartIsolate::DartIsolateShutdownCallback(
isolate_group_data
->
get
()
->
OnShutdownCallback
();
}
// |Dart_IsolateCleanupCallback|
void
DartIsolate
::
DartIsolateCleanupCallback
(
std
::
shared_ptr
<
DartIsolate
>*
isolate_data
)
{
delete
isolate_data
;
// |Dart_Isolate
Group
CleanupCallback|
void
DartIsolate
::
DartIsolate
Group
CleanupCallback
(
std
::
shared_ptr
<
DartIsolate
>*
embedder_isolate
)
{
delete
embedder_isolate
;
}
fml
::
RefPtr
<
const
DartSnapshot
>
DartIsolate
::
GetIsolateSnapshot
()
const
{
...
...
runtime/dart_isolate.h
浏览文件 @
3d2668c3
...
...
@@ -156,8 +156,8 @@ class DartIsolate : public UIDartState {
void
OnShutdownCallback
();
// |Dart_IsolateCreateCallback|
static
Dart_Isolate
DartIsolateCreateCallback
(
// |Dart_Isolate
Group
CreateCallback|
static
Dart_Isolate
DartIsolate
Group
CreateCallback
(
const
char
*
advisory_script_uri
,
const
char
*
advisory_script_entrypoint
,
const
char
*
package_root
,
...
...
@@ -189,8 +189,8 @@ class DartIsolate : public UIDartState {
std
::
shared_ptr
<
DartIsolate
>*
isolate_group_data
,
std
::
shared_ptr
<
DartIsolate
>*
isolate_data
);
// |Dart_IsolateCleanupCallback|
static
void
DartIsolateCleanupCallback
(
// |Dart_Isolate
Group
CleanupCallback|
static
void
DartIsolate
Group
CleanupCallback
(
std
::
shared_ptr
<
DartIsolate
>*
embedder_isolate
);
FML_DISALLOW_COPY_AND_ASSIGN
(
DartIsolate
);
...
...
runtime/dart_vm.cc
浏览文件 @
3d2668c3
...
...
@@ -366,12 +366,13 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
params
.
vm_snapshot_data
=
vm_data_
->
GetVMSnapshot
().
GetDataMapping
();
params
.
vm_snapshot_instructions
=
vm_data_
->
GetVMSnapshot
().
GetInstructionsMapping
();
params
.
create
=
reinterpret_cast
<
decltype
(
params
.
create
)
>
(
DartIsolate
::
DartIsolateCreateCallback
);
params
.
shutdown
=
reinterpret_cast
<
decltype
(
params
.
shutdown
)
>
(
DartIsolate
::
DartIsolateShutdownCallback
);
params
.
cleanup
=
reinterpret_cast
<
decltype
(
params
.
cleanup
)
>
(
DartIsolate
::
DartIsolateCleanupCallback
);
params
.
create_group
=
reinterpret_cast
<
decltype
(
params
.
create_group
)
>
(
DartIsolate
::
DartIsolateGroupCreateCallback
);
params
.
shutdown_isolate
=
reinterpret_cast
<
decltype
(
params
.
shutdown_isolate
)
>
(
DartIsolate
::
DartIsolateShutdownCallback
);
params
.
cleanup_group
=
reinterpret_cast
<
decltype
(
params
.
cleanup_group
)
>
(
DartIsolate
::
DartIsolateGroupCleanupCallback
);
params
.
thread_exit
=
ThreadExitCallback
;
params
.
get_service_assets
=
GetVMServiceAssetsArchiveCallback
;
params
.
entropy_source
=
dart
::
bin
::
GetEntropy
;
...
...
shell/platform/fuchsia/dart/dart_component_controller.cc
浏览文件 @
3d2668c3
...
...
@@ -324,12 +324,12 @@ bool DartComponentController::CreateIsolate(
auto
state
=
new
std
::
shared_ptr
<
tonic
::
DartState
>
(
new
tonic
::
DartState
(
namespace_fd
,
[
this
](
Dart_Handle
result
)
{
MessageEpilogue
(
result
);
}));
isolate_
=
Dart_CreateIsolate
(
isolate_
=
Dart_CreateIsolate
Group
(
url_
.
c_str
(),
label_
.
c_str
(),
isolate_snapshot_data
,
isolate_snapshot_instructions
,
shared_snapshot_data
,
shared_snapshot_instructions
,
nullptr
/* flags */
,
state
,
&
error
);
if
(
!
isolate_
)
{
FX_LOGF
(
ERROR
,
LOG_TAG
,
"Dart_CreateIsolate failed: %s"
,
error
);
FX_LOGF
(
ERROR
,
LOG_TAG
,
"Dart_CreateIsolate
Group
failed: %s"
,
error
);
return
false
;
}
...
...
shell/platform/fuchsia/dart/dart_runner.cc
浏览文件 @
3d2668c3
...
...
@@ -61,13 +61,13 @@ const char* kDartVMArgs[] = {
// clang-format on
};
Dart_Isolate
IsolateCreateCallback
(
const
char
*
uri
,
const
char
*
name
,
const
char
*
package_root
,
const
char
*
package_config
,
Dart_IsolateFlags
*
flags
,
void
*
callback_data
,
char
**
error
)
{
Dart_Isolate
Isolate
Group
CreateCallback
(
const
char
*
uri
,
const
char
*
name
,
const
char
*
package_root
,
const
char
*
package_config
,
Dart_IsolateFlags
*
flags
,
void
*
callback_data
,
char
**
error
)
{
if
(
std
::
string
(
uri
)
==
DART_VM_SERVICE_ISOLATE_NAME
)
{
#if defined(DART_PRODUCT)
*
error
=
strdup
(
"The service isolate is not implemented in product mode"
);
...
...
@@ -92,7 +92,7 @@ void IsolateShutdownCallback(void* callback_data) {
}
}
void
IsolateCleanupCallback
(
void
*
callback_data
)
{
void
Isolate
Group
CleanupCallback
(
void
*
callback_data
)
{
delete
static_cast
<
std
::
shared_ptr
<
tonic
::
DartState
>*>
(
callback_data
);
}
...
...
@@ -167,9 +167,9 @@ DartRunner::DartRunner() : context_(sys::ComponentContext::Create()) {
params
.
vm_snapshot_data
=
vm_snapshot_data_
.
address
();
params
.
vm_snapshot_instructions
=
vm_snapshot_instructions_
.
address
();
#endif
params
.
create
=
Isolate
CreateCallback
;
params
.
shutdown
=
IsolateShutdownCallback
;
params
.
cleanup
=
Isolate
CleanupCallback
;
params
.
create
_group
=
IsolateGroup
CreateCallback
;
params
.
shutdown
_isolate
=
IsolateShutdownCallback
;
params
.
cleanup
_group
=
IsolateGroup
CleanupCallback
;
params
.
entropy_source
=
EntropySource
;
#if !defined(DART_PRODUCT)
params
.
get_service_assets
=
GetVMServiceAssetsArchiveCallback
;
...
...
shell/platform/fuchsia/dart/service_isolate.cc
浏览文件 @
3d2668c3
...
...
@@ -123,14 +123,14 @@ Dart_Isolate CreateServiceIsolate(const char* uri,
#endif
auto
state
=
new
std
::
shared_ptr
<
tonic
::
DartState
>
(
new
tonic
::
DartState
());
Dart_Isolate
isolate
=
Dart_CreateIsolate
(
Dart_Isolate
isolate
=
Dart_CreateIsolate
Group
(
uri
,
DART_VM_SERVICE_ISOLATE_NAME
,
mapped_isolate_snapshot_data
.
address
(),
mapped_isolate_snapshot_instructions
.
address
(),
mapped_shared_snapshot_data
.
address
(),
mapped_shared_snapshot_instructions
.
address
(),
nullptr
/* flags */
,
state
,
error
);
if
(
!
isolate
)
{
FX_LOGF
(
ERROR
,
LOG_TAG
,
"Dart_CreateIsolate failed: %s"
,
*
error
);
FX_LOGF
(
ERROR
,
LOG_TAG
,
"Dart_CreateIsolate
Group
failed: %s"
,
*
error
);
return
nullptr
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录