Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
0a2869e5
E
engine
项目概览
weixin_43355755
/
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,发现更多精彩内容 >>
未验证
提交
0a2869e5
编写于
4月 10, 2019
作者:
B
Ben Konyi
提交者:
GitHub
4月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added support for authentication codes for the VM service (#8527)
上级
36d2135a
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
47 addition
and
4 deletion
+47
-4
DEPS
DEPS
+1
-1
ci/licenses_golden/licenses_third_party
ci/licenses_golden/licenses_third_party
+1
-1
common/settings.h
common/settings.h
+4
-0
runtime/dart_isolate.cc
runtime/dart_isolate.cc
+2
-1
runtime/dart_service_isolate.cc
runtime/dart_service_isolate.cc
+5
-0
runtime/dart_service_isolate.h
runtime/dart_service_isolate.h
+1
-0
runtime/dart_vm.cc
runtime/dart_vm.cc
+9
-0
shell/common/switches.cc
shell/common/switches.cc
+7
-0
shell/common/switches.h
shell/common/switches.h
+6
-0
shell/platform/android/io/flutter/app/FlutterActivityDelegate.java
...tform/android/io/flutter/app/FlutterActivityDelegate.java
+3
-0
shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java
...android/io/flutter/embedding/engine/FlutterShellArgs.java
+8
-1
未找到文件。
DEPS
浏览文件 @
0a2869e5
...
...
@@ -31,7 +31,7 @@ vars = {
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '1
490a90bc1c4cbbf13470af3408584e57d135fb2
',
'dart_revision': '1
5b11b018364ce032eae50d78fc8a52b541e2bce
',
# WARNING: DO NOT EDIT MANUALLY
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
...
...
ci/licenses_golden/licenses_third_party
浏览文件 @
0a2869e5
Signature:
1ab2f2e559e655ad5cfe1e759d241b54
Signature:
866085660a05bb407caffc09636cbd32
UNUSED LICENSES:
common/settings.h
浏览文件 @
0a2869e5
...
...
@@ -86,6 +86,10 @@ struct Settings {
uint32_t
observatory_port
=
0
;
bool
ipv6
=
false
;
// Determines whether an authentication code is required to communicate with
// the VM service.
bool
disable_service_auth_codes
=
true
;
// Font settings
bool
use_test_fonts
=
false
;
...
...
runtime/dart_isolate.cc
浏览文件 @
0a2869e5
...
...
@@ -579,7 +579,8 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
settings
.
observatory_port
,
// server observatory port
tonic
::
DartState
::
HandleLibraryTag
,
// embedder library tag handler
false
,
// disable websocket origin check
error
// error (out)
settings
.
disable_service_auth_codes
,
// disable VM service auth codes
error
// error (out)
))
{
// Error is populated by call to startup.
FML_DLOG
(
ERROR
)
<<
*
error
;
...
...
runtime/dart_service_isolate.cc
浏览文件 @
0a2869e5
...
...
@@ -134,6 +134,7 @@ bool DartServiceIsolate::Startup(std::string server_ip,
intptr_t
server_port
,
Dart_LibraryTagHandler
embedder_tag_handler
,
bool
disable_origin_check
,
bool
disable_service_auth_codes
,
char
**
error
)
{
Dart_Isolate
isolate
=
Dart_CurrentIsolate
();
FML_CHECK
(
isolate
);
...
...
@@ -196,6 +197,10 @@ bool DartServiceIsolate::Startup(std::string server_ip,
Dart_SetField
(
library
,
Dart_NewStringFromCString
(
"_originCheckDisabled"
),
Dart_NewBoolean
(
disable_origin_check
));
SHUTDOWN_ON_ERROR
(
result
);
result
=
Dart_SetField
(
library
,
Dart_NewStringFromCString
(
"_authCodesDisabled"
),
Dart_NewBoolean
(
disable_service_auth_codes
));
SHUTDOWN_ON_ERROR
(
result
);
return
true
;
}
...
...
runtime/dart_service_isolate.h
浏览文件 @
0a2869e5
...
...
@@ -26,6 +26,7 @@ class DartServiceIsolate {
intptr_t
server_port
,
Dart_LibraryTagHandler
embedder_tag_handler
,
bool
disable_origin_check
,
bool
disable_service_auth_codes
,
char
**
error
);
static
std
::
string
GetObservatoryUri
();
...
...
runtime/dart_vm.cc
浏览文件 @
0a2869e5
...
...
@@ -84,6 +84,10 @@ static const char* kDartStartPausedArgs[]{
"--pause_isolates_on_start"
,
};
static
const
char
*
kDartDisableServiceAuthCodesArgs
[]{
"--disable-service-auth-codes"
,
};
static
const
char
*
kDartTraceStartupArgs
[]{
"--timeline_streams=Compiler,Dart,Debugger,Embedder,GC,Isolate,VM"
,
};
...
...
@@ -325,6 +329,11 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
PushBackAll
(
&
args
,
kDartStartPausedArgs
,
arraysize
(
kDartStartPausedArgs
));
}
if
(
settings_
.
disable_service_auth_codes
)
{
PushBackAll
(
&
args
,
kDartDisableServiceAuthCodesArgs
,
arraysize
(
kDartDisableServiceAuthCodesArgs
));
}
if
(
settings_
.
endless_trace_buffer
||
settings_
.
trace_startup
)
{
// If we are tracing startup, make sure the trace buffer is endless so we
// don't lose early traces.
...
...
shell/common/switches.cc
浏览文件 @
0a2869e5
...
...
@@ -166,6 +166,13 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
}
}
// Enable need for authentication codes for VM service communication, if
// specified.
// TODO(bkonyi): when authentication codes are enabled by default, change
// to 'DisableServiceAuthCodes' and un-negate.
settings
.
disable_service_auth_codes
=
!
command_line
.
HasOption
(
FlagForSwitch
(
Switch
::
EnableServiceAuthCodes
));
// Checked mode overrides.
settings
.
disable_dart_asserts
=
command_line
.
HasOption
(
FlagForSwitch
(
Switch
::
DisableDartAsserts
));
...
...
shell/common/switches.h
浏览文件 @
0a2869e5
...
...
@@ -96,6 +96,12 @@ DEF_SWITCH(FlutterAssetsDir,
"Path to the Flutter assets directory."
)
DEF_SWITCH
(
Help
,
"help"
,
"Display this help text."
)
DEF_SWITCH
(
LogTag
,
"log-tag"
,
"Tag associated with log messages."
)
// TODO(bkonyi): when authentication codes are enabled by default, change
// to 'disable-service-auth-codes' instead of 'enable-service-auth-codes'.
DEF_SWITCH
(
EnableServiceAuthCodes
,
"enable-service-auth-codes"
,
"Enable the requirement for authentication codes for communicating"
" with the VM service."
)
DEF_SWITCH
(
StartPaused
,
"start-paused"
,
"Start the application paused in the Dart debugger."
)
...
...
shell/platform/android/io/flutter/app/FlutterActivityDelegate.java
浏览文件 @
0a2869e5
...
...
@@ -297,6 +297,9 @@ public final class FlutterActivityDelegate
if
(
intent
.
getBooleanExtra
(
"start-paused"
,
false
))
{
args
.
add
(
"--start-paused"
);
}
if
(
intent
.
getBooleanExtra
(
"enable-service-auth-codes"
,
false
))
{
args
.
add
(
"--enable-service-auth-codes"
);
}
if
(
intent
.
getBooleanExtra
(
"use-test-fonts"
,
false
))
{
args
.
add
(
"--use-test-fonts"
);
}
...
...
shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java
浏览文件 @
0a2869e5
...
...
@@ -27,6 +27,8 @@ public class FlutterShellArgs {
public
static
final
String
ARG_TRACE_STARTUP
=
"--trace-startup"
;
public
static
final
String
ARG_KEY_START_PAUSED
=
"start-paused"
;
public
static
final
String
ARG_START_PAUSED
=
"--start-paused"
;
public
static
final
String
ARG_KEY_ENABLE_SERVICE_AUTH_CODES
=
"enable-service-auth-codes"
;
public
static
final
String
ARG_ENABLE_SERVICE_AUTH_CODES
=
"--enable-service-auth-codes"
;
public
static
final
String
ARG_KEY_USE_TEST_FONTS
=
"use-test-fonts"
;
public
static
final
String
ARG_USE_TEST_FONTS
=
"--use-test-fonts"
;
public
static
final
String
ARG_KEY_ENABLE_DART_PROFILING
=
"enable-dart-profiling"
;
...
...
@@ -56,6 +58,11 @@ public class FlutterShellArgs {
if
(
intent
.
getBooleanExtra
(
ARG_KEY_START_PAUSED
,
false
))
{
args
.
add
(
ARG_START_PAUSED
);
}
// TODO(bkonyi): when authentication codes are enabled by default, change
// to 'disable-service-auth-codes' instead of 'enable-service-auth-codes'.
if
(
intent
.
getBooleanExtra
(
ARG_KEY_ENABLE_SERVICE_AUTH_CODES
,
false
))
{
args
.
add
(
ARG_ENABLE_SERVICE_AUTH_CODES
);
}
if
(
intent
.
getBooleanExtra
(
ARG_KEY_USE_TEST_FONTS
,
false
))
{
args
.
add
(
ARG_USE_TEST_FONTS
);
}
...
...
@@ -133,4 +140,4 @@ public class FlutterShellArgs {
String
[]
argsArray
=
new
String
[
args
.
size
()];
return
args
.
toArray
(
argsArray
);
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录