Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
5d0e13a4
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,发现更多精彩内容 >>
未验证
提交
5d0e13a4
编写于
7月 19, 2018
作者:
S
Stanislav Baranov
提交者:
GitHub
7月 19, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix starting isolate directly from CoreJIT snapshot. (#5798)
上级
09ff9493
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
19 deletion
+12
-19
runtime/dart_isolate.cc
runtime/dart_isolate.cc
+2
-7
shell/common/isolate_configuration.cc
shell/common/isolate_configuration.cc
+6
-9
shell/common/isolate_configuration.h
shell/common/isolate_configuration.h
+1
-1
shell/platform/android/platform_view_android_jni.cc
shell/platform/android/platform_view_android_jni.cc
+3
-2
未找到文件。
runtime/dart_isolate.cc
浏览文件 @
5d0e13a4
...
...
@@ -257,10 +257,6 @@ bool DartIsolate::PrepareForRunningFromPrecompiledCode() {
return
false
;
}
if
(
!
DartVM
::
IsRunningPrecompiledCode
())
{
return
false
;
}
tonic
::
DartState
::
Scope
scope
(
this
);
if
(
Dart_IsNull
(
Dart_RootLibrary
()))
{
...
...
@@ -342,9 +338,8 @@ bool DartIsolate::PrepareForRunningFromSnapshot(
tonic
::
DartState
::
Scope
scope
(
this
);
if
(
!
Dart_IsNull
(
Dart_RootLibrary
()))
{
return
false
;
}
// Use root library provided by kernel in favor of one provided by snapshot.
Dart_SetRootLibrary
(
Dart_Null
());
if
(
!
LoadSnapshot
(
mapping
,
last_piece
))
{
return
false
;
...
...
shell/common/isolate_configuration.cc
浏览文件 @
5d0e13a4
...
...
@@ -31,20 +31,17 @@ bool IsolateConfiguration::PrepareIsolate(
return
DoPrepareIsolate
(
*
isolate
);
}
class
Precompiled
IsolateConfiguration
final
:
public
IsolateConfiguration
{
class
AppSnapshot
IsolateConfiguration
final
:
public
IsolateConfiguration
{
public:
Precompiled
IsolateConfiguration
()
=
default
;
AppSnapshot
IsolateConfiguration
()
=
default
;
// |shell::IsolateConfiguration|
bool
DoPrepareIsolate
(
blink
::
DartIsolate
&
isolate
)
override
{
if
(
!
blink
::
DartVM
::
IsRunningPrecompiledCode
())
{
return
false
;
}
return
isolate
.
PrepareForRunningFromPrecompiledCode
();
}
private:
FXL_DISALLOW_COPY_AND_ASSIGN
(
Precompiled
IsolateConfiguration
);
FXL_DISALLOW_COPY_AND_ASSIGN
(
AppSnapshot
IsolateConfiguration
);
};
class
SnapshotIsolateConfiguration
:
public
IsolateConfiguration
{
...
...
@@ -122,7 +119,7 @@ std::unique_ptr<IsolateConfiguration> IsolateConfiguration::InferFromSettings(
fml
::
RefPtr
<
blink
::
AssetManager
>
asset_manager
)
{
// Running in AOT mode.
if
(
blink
::
DartVM
::
IsRunningPrecompiledCode
())
{
return
CreateFor
PrecompiledCode
();
return
CreateFor
AppSnapshot
();
}
// Run from sources.
...
...
@@ -193,8 +190,8 @@ std::unique_ptr<IsolateConfiguration> IsolateConfiguration::InferFromSettings(
}
std
::
unique_ptr
<
IsolateConfiguration
>
IsolateConfiguration
::
CreateFor
PrecompiledCode
()
{
return
std
::
make_unique
<
Precompiled
IsolateConfiguration
>
();
IsolateConfiguration
::
CreateFor
AppSnapshot
()
{
return
std
::
make_unique
<
AppSnapshot
IsolateConfiguration
>
();
}
std
::
unique_ptr
<
IsolateConfiguration
>
IsolateConfiguration
::
CreateForSnapshot
(
...
...
shell/common/isolate_configuration.h
浏览文件 @
5d0e13a4
...
...
@@ -24,7 +24,7 @@ class IsolateConfiguration {
const
blink
::
Settings
&
settings
,
fml
::
RefPtr
<
blink
::
AssetManager
>
asset_manager
);
static
std
::
unique_ptr
<
IsolateConfiguration
>
CreateFor
PrecompiledCode
();
static
std
::
unique_ptr
<
IsolateConfiguration
>
CreateFor
AppSnapshot
();
static
std
::
unique_ptr
<
IsolateConfiguration
>
CreateForSnapshot
(
std
::
unique_ptr
<
fml
::
Mapping
>
snapshot
);
...
...
shell/platform/android/platform_view_android_jni.cc
浏览文件 @
5d0e13a4
...
...
@@ -178,7 +178,7 @@ static void SurfaceDestroyed(JNIEnv* env, jobject jcaller, jlong shell_holder) {
std
::
unique_ptr
<
IsolateConfiguration
>
CreateIsolateConfiguration
(
const
blink
::
AssetManager
&
asset_manager
)
{
if
(
blink
::
DartVM
::
IsRunningPrecompiledCode
())
{
return
IsolateConfiguration
::
CreateFor
PrecompiledCode
();
return
IsolateConfiguration
::
CreateFor
AppSnapshot
();
}
const
auto
configuration_from_blob
=
...
...
@@ -200,7 +200,8 @@ std::unique_ptr<IsolateConfiguration> CreateIsolateConfiguration(
return
script
;
}
return
nullptr
;
// This happens when starting isolate directly from CoreJIT snapshot.
return
IsolateConfiguration
::
CreateForAppSnapshot
();
}
static
void
RunBundleAndSnapshot
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录