Commit ce9161d6 authored by sky's avatar sky Committed by Commit bot

Update mojo sdk to rev 912f52f69dadbe1e3cf9576f26731863770bcfc3

R=brettw@chromium.org, jamesr@chromium.org
TBR=jamesr@chromium.org
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/1035933002

Cr-Commit-Position: refs/heads/master@{#322518}
parent ca992267
...@@ -7,25 +7,26 @@ mojo_sdk_root = "//third_party/mojo/src" ...@@ -7,25 +7,26 @@ mojo_sdk_root = "//third_party/mojo/src"
# Chromium builds the network service from source, as it is the # Chromium builds the network service from source, as it is the
# producer of the network service. # producer of the network service.
build_network_service_from_source = true mojo_build_network_service_from_source = true
# Chromium does not build dart apptests. Disable any Mojo targets which # Chromium does not build dart apptests. Disable any Mojo targets which
# depend on the apptest framework. # depend on the apptest framework.
disable_dart_apptest_framework = true mojo_disable_dart_apptest_framework = true
# Points to the directory network_service is built from. # Points to the directory network_service is built from.
network_service_root = "//mojo/services" mojo_network_service_root = "//mojo/services"
declare_args() { declare_args() {
# Specify prebuilt network service mojo file location rather than download # Specify prebuilt network service mojo file location rather than download
# from gs://mojo. # from gs://mojo.
# #
# This variable only used when build_network_service_from_source is false. # This variable only used when mojo_build_network_service_from_source is
# false.
# #
# Currently only android_arm and linux_64 available on gs://mojo, and no plan # Currently only android_arm and linux_64 available on gs://mojo, and no plan
# to support more(https://codereview.chromium.org/921873003). # to support more(https://codereview.chromium.org/921873003).
# It is needed for developers works on other platforms like android_x86 and # It is needed for developers works on other platforms like android_x86 and
# android_x64. And it is also useful for supportted platform as well when # android_x64. And it is also useful for supportted platform as well when
# developer want to try its own version of network service files. # developer want to try its own version of network service files.
prebuilt_network_service_location = "" mojo_prebuilt_network_service_location = ""
} }
...@@ -21,9 +21,9 @@ namespace embedder { ...@@ -21,9 +21,9 @@ namespace embedder {
// The maximum number of handles that can be sent "at once" using // The maximum number of handles that can be sent "at once" using
// |PlatformChannelSendmsgWithHandles()|. // |PlatformChannelSendmsgWithHandles()|.
// TODO(vtl): This number is taken from ipc/file_descriptor_set_posix.h: // TODO(vtl): This number is taken from ipc/ipc_message_attachment_set.h:
// |FileDescriptorSet::kMaxDescriptorsPerMessage|. Where does it come from? // |IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage|.
const size_t kPlatformChannelMaxNumHandles = 7; const size_t kPlatformChannelMaxNumHandles = 128;
// Use these to write to a socket created using |PlatformChannelPair| (or // Use these to write to a socket created using |PlatformChannelPair| (or
// equivalent). These are like |write()| and |writev()|, but handle |EINTR| and // equivalent). These are like |write()| and |writev()|, but handle |EINTR| and
......
...@@ -409,7 +409,7 @@ MOJO_MULTIPROCESS_TEST_CHILD_MAIN(CheckPlatformHandleFile) { ...@@ -409,7 +409,7 @@ MOJO_MULTIPROCESS_TEST_CHILD_MAIN(CheckPlatformHandleFile) {
std::string read_buffer(100, '\0'); std::string read_buffer(100, '\0');
uint32_t num_bytes = static_cast<uint32_t>(read_buffer.size()); uint32_t num_bytes = static_cast<uint32_t>(read_buffer.size());
DispatcherVector dispatchers; DispatcherVector dispatchers;
uint32_t num_dispatchers = 30; // Maximum number to receive. uint32_t num_dispatchers = 255; // Maximum number to receive.
CHECK_EQ(mp->ReadMessage(0, UserPointer<void>(&read_buffer[0]), CHECK_EQ(mp->ReadMessage(0, UserPointer<void>(&read_buffer[0]),
MakeUserPointer(&num_bytes), &dispatchers, MakeUserPointer(&num_bytes), &dispatchers,
&num_dispatchers, MOJO_READ_MESSAGE_FLAG_NONE), &num_dispatchers, MOJO_READ_MESSAGE_FLAG_NONE),
...@@ -512,7 +512,7 @@ TEST_P(MultiprocessMessagePipeTestWithPipeCount, PlatformHandlePassing) { ...@@ -512,7 +512,7 @@ TEST_P(MultiprocessMessagePipeTestWithPipeCount, PlatformHandlePassing) {
#if defined(OS_POSIX) && !defined(OS_ANDROID) #if defined(OS_POSIX) && !defined(OS_ANDROID)
INSTANTIATE_TEST_CASE_P(PipeCount, INSTANTIATE_TEST_CASE_P(PipeCount,
MultiprocessMessagePipeTestWithPipeCount, MultiprocessMessagePipeTestWithPipeCount,
testing::Values(1u, 10u, 25u)); testing::Values(1u, 128u, 255u));
#endif #endif
} // namespace } // namespace
......
e252977e5b22685a1b4fdb14eda40c78935ea50a 912f52f69dadbe1e3cf9576f26731863770bcfc3
\ No newline at end of file \ No newline at end of file
...@@ -6,23 +6,25 @@ import("//build/module_args/mojo.gni") ...@@ -6,23 +6,25 @@ import("//build/module_args/mojo.gni")
# If using the prebuilt shell, gate its usage by the platforms for which it is # If using the prebuilt shell, gate its usage by the platforms for which it is
# published. # published.
use_prebuilt_mojo_shell = false mojo_use_prebuilt_mojo_shell = false
if (!defined(build_mojo_shell_from_source) || !build_mojo_shell_from_source) { if (!defined(mojo_build_mojo_shell_from_source) ||
use_prebuilt_mojo_shell = is_linux || is_android !mojo_build_mojo_shell_from_source) {
mojo_use_prebuilt_mojo_shell = is_linux || is_android
} }
# If using the prebuilt network service, gate its usage by the platforms for # If using the prebuilt network service, gate its usage by the platforms for
# which it is published. # which it is published.
use_prebuilt_network_service = false mojo_use_prebuilt_network_service = false
if (!defined(build_network_service_from_source) || if (!defined(mojo_build_network_service_from_source) ||
!build_network_service_from_source) { !mojo_build_network_service_from_source) {
use_prebuilt_network_service = is_linux || is_android mojo_use_prebuilt_network_service = is_linux || is_android
} }
# Enable Dart apptest framework by default. # Enable Dart apptest framework by default.
use_dart_apptest_framework = true mojo_use_dart_apptest_framework = true
if (defined(disable_dart_apptest_framework) && disable_dart_apptest_framework) { if (defined(mojo_disable_dart_apptest_framework) &&
use_dart_apptest_framework = false mojo_disable_dart_apptest_framework) {
mojo_use_dart_apptest_framework = false
} }
# The absolute path to the directory containing the mojo public SDK (i.e., the # The absolute path to the directory containing the mojo public SDK (i.e., the
......
...@@ -77,11 +77,11 @@ template("mojo_native_application") { ...@@ -77,11 +77,11 @@ template("mojo_native_application") {
} }
# Copy any necessary prebuilt artifacts. # Copy any necessary prebuilt artifacts.
if (use_prebuilt_mojo_shell) { if (mojo_use_prebuilt_mojo_shell) {
data_deps += data_deps +=
[ rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) ] [ rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) ]
} }
if (use_prebuilt_network_service) { if (mojo_use_prebuilt_network_service) {
data_deps += [ rebase_path("mojo/public/tools:copy_network_service", data_deps += [ rebase_path("mojo/public/tools:copy_network_service",
".", ".",
mojo_root) ] mojo_root) ]
...@@ -197,11 +197,11 @@ template("mojo_native_application") { ...@@ -197,11 +197,11 @@ template("mojo_native_application") {
} }
# Copy any necessary prebuilt artifacts. # Copy any necessary prebuilt artifacts.
if (use_prebuilt_mojo_shell) { if (mojo_use_prebuilt_mojo_shell) {
data_deps += data_deps +=
[ rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) ] [ rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) ]
} }
if (use_prebuilt_network_service) { if (mojo_use_prebuilt_network_service) {
data_deps += [ rebase_path("mojo/public/tools:copy_network_service", data_deps += [ rebase_path("mojo/public/tools:copy_network_service",
".", ".",
mojo_root) ] mojo_root) ]
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import("//build/module_args/mojo.gni") import("//build/module_args/mojo.gni")
import("../mojo.gni") import("../mojo.gni")
if (use_prebuilt_mojo_shell) { if (mojo_use_prebuilt_mojo_shell) {
copy("copy_mojo_shell") { copy("copy_mojo_shell") {
filename = "mojo_shell" filename = "mojo_shell"
if (is_android) { if (is_android) {
...@@ -28,13 +28,13 @@ if (use_prebuilt_mojo_shell) { ...@@ -28,13 +28,13 @@ if (use_prebuilt_mojo_shell) {
} }
} }
if (use_prebuilt_network_service) { if (mojo_use_prebuilt_network_service) {
copy("copy_network_service") { copy("copy_network_service") {
filename = "network_service.mojo" filename = "network_service.mojo"
if (defined(prebuilt_network_service_location) && if (defined(mojo_prebuilt_network_service_location) &&
prebuilt_network_service_location != "") { mojo_prebuilt_network_service_location != "") {
sources = [ sources = [
"$prebuilt_network_service_location", "$mojo_prebuilt_network_service_location",
] ]
} else { } else {
if (is_android) { if (is_android) {
...@@ -78,7 +78,7 @@ if (use_prebuilt_network_service) { ...@@ -78,7 +78,7 @@ if (use_prebuilt_network_service) {
# loaded from Google Storage and then puts it in a rule which the # loaded from Google Storage and then puts it in a rule which the
# "dart_package" template in mojo/public/dart/rules.gni can introspect on, # "dart_package" template in mojo/public/dart/rules.gni can introspect on,
# accessing the 'label' and 'target_out_dir' variables. # accessing the 'label' and 'target_out_dir' variables.
if (use_dart_apptest_framework) { if (mojo_use_dart_apptest_framework) {
copy("dart_apptest_framework") { copy("dart_apptest_framework") {
sources = [ sources = [
"prebuilt/frameworks/apptest.dartzip", "prebuilt/frameworks/apptest.dartzip",
......
...@@ -12,14 +12,14 @@ mojom("interfaces") { ...@@ -12,14 +12,14 @@ mojom("interfaces") {
import_dirs = [ get_path_info("../../../", "abspath") ] import_dirs = [ get_path_info("../../../", "abspath") ]
if (defined(network_service_root)) { if (defined(mojo_network_service_root)) {
import_dirs += [ network_service_root ] import_dirs += [ mojo_network_service_root ]
} else { } else {
network_service_root = "../../.." mojo_network_service_root = "../../.."
} }
deps = [ deps = [
"$network_service_root/network/public/interfaces", "$mojo_network_service_root/network/public/interfaces",
] ]
mojo_sdk_deps = [ "mojo/public/interfaces/application" ] mojo_sdk_deps = [ "mojo/public/interfaces/application" ]
......
...@@ -15,13 +15,13 @@ mojom("interfaces") { ...@@ -15,13 +15,13 @@ mojom("interfaces") {
import_dirs = [ get_path_info("../../../", "abspath") ] import_dirs = [ get_path_info("../../../", "abspath") ]
if (defined(network_service_root)) { if (defined(mojo_network_service_root)) {
import_dirs += [ network_service_root ] import_dirs += [ mojo_network_service_root ]
} else { } else {
network_service_root = "../../.." mojo_network_service_root = "../../.."
} }
deps = [ deps = [
"$network_service_root/network/public/interfaces", "$mojo_network_service_root/network/public/interfaces",
] ]
} }
...@@ -12,13 +12,13 @@ mojom("interfaces") { ...@@ -12,13 +12,13 @@ mojom("interfaces") {
import_dirs = [ get_path_info("../../../", "abspath") ] import_dirs = [ get_path_info("../../../", "abspath") ]
if (defined(network_service_root)) { if (defined(mojo_network_service_root)) {
import_dirs += [ network_service_root ] import_dirs += [ mojo_network_service_root ]
} else { } else {
network_service_root = "../../.." mojo_network_service_root = "../../.."
} }
deps = [ deps = [
"$network_service_root/network/public/interfaces", "$mojo_network_service_root/network/public/interfaces",
] ]
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment