Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
df188190
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
df188190
编写于
12月 12, 2017
作者:
Z
Zachary Anderson
提交者:
GitHub
12月 12, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Platform.localeName by setting _Platform._localeClosure (#4450)
上级
e07eafae
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
7 deletion
+19
-7
lib/ui/dart_runtime_hooks.cc
lib/ui/dart_runtime_hooks.cc
+11
-7
lib/ui/hooks.dart
lib/ui/hooks.dart
+6
-0
runtime/dart_vm_entry_points.txt
runtime/dart_vm_entry_points.txt
+2
-0
未找到文件。
lib/ui/dart_runtime_hooks.cc
浏览文件 @
df188190
...
...
@@ -112,16 +112,20 @@ static void InitDartAsync(Dart_Handle builtin_library,
&
schedule_microtask
));
}
static
void
InitDartIO
(
const
std
::
string
&
script_uri
)
{
static
void
InitDartIO
(
Dart_Handle
builtin_library
,
const
std
::
string
&
script_uri
)
{
Dart_Handle
io_lib
=
Dart_LookupLibrary
(
ToDart
(
"dart:io"
));
DART_CHECK_VALID
(
io_lib
);
Dart_Handle
platform_type
=
Dart_GetType
(
io_lib
,
ToDart
(
"_Platform"
),
0
,
nullptr
);
DART_CHECK_VALID
(
platform_type
);
if
(
!
script_uri
.
empty
())
{
Dart_Handle
io_lib
=
Dart_LookupLibrary
(
ToDart
(
"dart:io"
));
DART_CHECK_VALID
(
io_lib
);
Dart_Handle
platform_type
=
Dart_GetType
(
io_lib
,
ToDart
(
"_Platform"
),
0
,
nullptr
);
DART_CHECK_VALID
(
platform_type
);
DART_CHECK_VALID
(
Dart_SetField
(
platform_type
,
ToDart
(
"_nativeScript"
),
ToDart
(
script_uri
)));
}
Dart_Handle
locale_closure
=
GetClosure
(
builtin_library
,
"_getLocaleClosure"
);
DART_CHECK_VALID
(
Dart_SetField
(
platform_type
,
ToDart
(
"_localeClosure"
),
locale_closure
));
}
void
DartRuntimeHooks
::
Install
(
IsolateType
isolate_type
,
...
...
@@ -131,7 +135,7 @@ void DartRuntimeHooks::Install(IsolateType isolate_type,
InitDartInternal
(
builtin
,
isolate_type
);
InitDartCore
(
builtin
,
script_uri
);
InitDartAsync
(
builtin
,
isolate_type
);
InitDartIO
(
script_uri
);
InitDartIO
(
builtin
,
script_uri
);
}
// Implementation of native functions which are used for some
...
...
lib/ui/hooks.dart
浏览文件 @
df188190
...
...
@@ -39,6 +39,12 @@ void _updateWindowMetrics(double devicePixelRatio,
_invoke
(
window
.
onMetricsChanged
,
window
.
_onMetricsChangedZone
);
}
typedef
String
LocaleClosure
(
);
String
_localeClosure
(
)
=>
window
.
_locale
.
toString
();
LocaleClosure
_getLocaleClosure
(
)
=>
_localeClosure
;
void
_updateLocale
(
String
languageCode
,
String
countryCode
)
{
window
.
_locale
=
new
Locale
(
languageCode
,
countryCode
);
_invoke
(
window
.
onLocaleChanged
,
window
.
_onLocaleChangedZone
);
...
...
runtime/dart_vm_entry_points.txt
浏览文件 @
df188190
dart:_internal,::,_printClosure
dart:async,::,_setScheduleImmediateClosure
dart:io,::,_setupHooks
dart:io,_Platform,_localeClosure
dart:io,_Platform,set:_nativeScript
dart:isolate,::,_getIsolateScheduleImmediateClosure
dart:isolate,::,_setupHooks
...
...
@@ -12,6 +13,7 @@ dart:ui,::,_dispatchSemanticsAction
dart:ui,::,_drawFrame
dart:ui,::,_getGetBaseURLClosure
dart:ui,::,_baseURL
dart:ui,::,_getLocaleClosure
dart:ui,::,_getMainClosure
dart:ui,::,_getPrintClosure
dart:ui,::,_getScheduleMicrotaskClosure
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录