diff options
24 files changed, 1 insertions, 221 deletions
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 190001f..71873be 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -2106,7 +2106,6 @@ '../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_media_galleries', '../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_packaged_app', '../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_socket_permissions', - '../ppapi/ppapi_tests_mojo.gyp:ppapi_tests_mojo', ], 'conditions': [ ['chromeos==1', { diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 6a9af83..8268f25 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn @@ -720,7 +720,6 @@ if (!is_android) { # "../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_background_keepalive", # TODO(GYP) # "../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_media_galleries", # TODO(GYP) # "../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_packaged_app", # TODO(GYP) - # "../ppapi/ppapi_tests_mojo.gyp:ppapi_tests_mojo", # TODO(GYP) ] if (is_chromeos) { sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ] diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc index fcd1f16..8e0ed84 100644 --- a/chrome/test/ppapi/ppapi_browsertest.cc +++ b/chrome/test/ppapi/ppapi_browsertest.cc @@ -1407,57 +1407,4 @@ IN_PROC_BROWSER_TEST_F(NewlibPackagedAppTest, SocketPermissions) { RunTests("socket_permissions"); } -class MojoPPAPITest : public InProcessBrowserTest { - public: - MojoPPAPITest() : InProcessBrowserTest() { } - virtual ~MojoPPAPITest() { } - - void RunTestInternal() { - base::FilePath document_root; - ASSERT_TRUE(ui_test_utils::GetRelativeBuildDirectory(&document_root)); - net::SpawnedTestServer http_server(net::SpawnedTestServer::TYPE_HTTP, - net::SpawnedTestServer::kLocalhost, - document_root); - ASSERT_TRUE(http_server.Start()); - - std::string query = "files/test_case.html?testcase=Mojo&mode=mojo"; - GURL test_url = http_server.GetURL(query); - - PPAPITestMessageHandler handler; - content::JavascriptTestObserver observer( - browser()->tab_strip_model()->GetActiveWebContents(), - &handler); - ui_test_utils::NavigateToURL(browser(), test_url); - - ASSERT_TRUE(observer.Run()) << handler.error_message(); - result_ = handler.message(); - } - - void RunTest() { - base::CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableNaClMojo); - RunTestInternal(); - EXPECT_STREQ("PASS", result_.c_str()); - } - void RunTestWithoutFlag() { - RunTestInternal(); - EXPECT_STREQ("Plugin crashed. 'NaCl module crashed'", result_.c_str()); - } - private: - std::string result_; -}; - -IN_PROC_BROWSER_TEST_F(MojoPPAPITest, Mojo) { - RunTest(); -} - -#if defined(OS_WIN) -#define MAYBE_MojoFailsWithoutFlag DISABLED_MojoFailsWithoutFlag -#else -#define MAYBE_MojoFailsWithoutFlag MojoFailsWithoutFlag -#endif - -IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MojoFailsWithoutFlag) { - RunTestWithoutFlag(); -} #endif diff --git a/components/nacl.gyp b/components/nacl.gyp index 5888d75..9c8e2b3 100644 --- a/components/nacl.gyp +++ b/components/nacl.gyp @@ -73,11 +73,9 @@ '../base/base.gyp:base_static', '../crypto/crypto.gyp:crypto', '../ipc/ipc.gyp:ipc', - '../mojo/mojo_nacl.gyp:monacl_syscall', '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome', '../ppapi/ppapi_internal.gyp:ppapi_ipc', '../ppapi/ppapi_internal.gyp:ppapi_shared', - '../third_party/mojo/mojo_edk.gyp:mojo_system_impl', ], 'conditions': [ ['disable_nacl_untrusted==0', { @@ -227,7 +225,6 @@ ], 'dependencies': [ 'nacl_linux', - '../third_party/mojo/mojo_edk.gyp:mojo_system_impl', ], 'cflags': ['-fPIE'], 'ldflags!': [ @@ -335,11 +332,9 @@ }, 'dependencies': [ 'nacl_common_win64', - '../mojo/mojo_nacl.gyp:monacl_syscall_win64', '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome64', '../ppapi/ppapi_internal.gyp:ppapi_shared_win64', '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64', - '../third_party/mojo/mojo_edk.gyp:mojo_system_impl_win64', ], 'export_dependent_settings': [ '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64', diff --git a/components/nacl/BUILD.gn b/components/nacl/BUILD.gn index cb4496f..5576df1 100644 --- a/components/nacl/BUILD.gn +++ b/components/nacl/BUILD.gn @@ -33,7 +33,6 @@ if (enable_nacl) { "//content/public/common", "//crypto", "//ipc", - "//mojo/nacl:monacl_sel", "//native_client/src/trusted/service_runtime:sel_main_chrome", "//ppapi/c", "//ppapi/proxy:ipc", @@ -181,7 +180,6 @@ if (enable_nacl) { "//content/public/common", "//crypto", "//ipc", - "//mojo/nacl:monacl_sel", "//sandbox/linux:libc_urandom_override", ] diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc index 0335029..2abf7a1 100644 --- a/components/nacl/browser/nacl_process_host.cc +++ b/components/nacl/browser/nacl_process_host.cc @@ -840,8 +840,6 @@ bool NaClProcessHost::StartNaClExecution() { params.validation_cache_key = nacl_browser->GetValidationCacheKey(); params.version = NaClBrowser::GetDelegate()->GetVersionString(); params.enable_debug_stub = enable_nacl_debug; - params.enable_mojo = base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableNaClMojo); const ChildProcessData& data = process_->GetData(); if (!ShareHandleToSelLdr(data.handle, diff --git a/components/nacl/common/nacl_messages.h b/components/nacl/common/nacl_messages.h index 191d5b9..46cae3f 100644 --- a/components/nacl/common/nacl_messages.h +++ b/components/nacl/common/nacl_messages.h @@ -25,7 +25,6 @@ IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams) IPC_STRUCT_TRAITS_MEMBER(version) IPC_STRUCT_TRAITS_MEMBER(enable_debug_stub) IPC_STRUCT_TRAITS_MEMBER(enable_ipc_proxy) - IPC_STRUCT_TRAITS_MEMBER(enable_mojo) IPC_STRUCT_TRAITS_MEMBER(process_type) IPC_STRUCT_TRAITS_MEMBER(crash_info_shmem_handle) IPC_STRUCT_TRAITS_END() diff --git a/components/nacl/common/nacl_switches.cc b/components/nacl/common/nacl_switches.cc index 4f158ad..6c5c81c 100644 --- a/components/nacl/common/nacl_switches.cc +++ b/components/nacl/common/nacl_switches.cc @@ -12,9 +12,6 @@ const char kDisablePnaclCrashThrottling[] = "disable-pnacl-crash-throttling"; // Enables debugging via RSP over a socket. const char kEnableNaClDebug[] = "enable-nacl-debug"; -// Enables Mojo support for Native Client plugins. -const char kEnableNaClMojo[] = "enable-nacl-mojo"; - // Enables Non-SFI mode, in which programs can be run without NaCl's SFI // sandbox. const char kEnableNaClNonSfiMode[] = "enable-nacl-nonsfi-mode"; diff --git a/components/nacl/common/nacl_switches.h b/components/nacl/common/nacl_switches.h index ebaaa86..f6a4b4f 100644 --- a/components/nacl/common/nacl_switches.h +++ b/components/nacl/common/nacl_switches.h @@ -13,7 +13,6 @@ namespace switches { // alongside the definition of their values in the .cc file. extern const char kDisablePnaclCrashThrottling[]; extern const char kEnableNaClDebug[]; -extern const char kEnableNaClMojo[]; extern const char kEnableNaClNonSfiMode[]; extern const char kEnablePNaClSubzero[]; extern const char kNaClBrokerProcess[]; diff --git a/components/nacl/common/nacl_types.cc b/components/nacl/common/nacl_types.cc index 4abb828..f7e628b 100644 --- a/components/nacl/common/nacl_types.cc +++ b/components/nacl/common/nacl_types.cc @@ -12,7 +12,6 @@ NaClStartParams::NaClStartParams() validation_cache_enabled(false), enable_debug_stub(false), enable_ipc_proxy(false), - enable_mojo(false), process_type(kUnknownNaClProcessType), crash_info_shmem_handle(base::SharedMemory::NULLHandle()) { } diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h index f691edf..e5b7136 100644 --- a/components/nacl/common/nacl_types.h +++ b/components/nacl/common/nacl_types.h @@ -95,9 +95,6 @@ struct NaClStartParams { bool enable_debug_stub; bool enable_ipc_proxy; - // Enables plugin code to use Mojo APIs. See mojo/nacl for details. - bool enable_mojo; - NaClAppProcessType process_type; // For NaCl <-> renderer crash information reporting. diff --git a/components/nacl/loader/DEPS b/components/nacl/loader/DEPS index 9cb889f..1b8ec2f 100644 --- a/components/nacl/loader/DEPS +++ b/components/nacl/loader/DEPS @@ -29,7 +29,5 @@ include_rules = [ # For sending PpapiHostMsg_ChannelCreated in nacl_ipc_adapter.cc: "+ppapi/proxy/ppapi_messages.h", - # For supporting Mojo in plugins. - "+mojo/nacl", "+third_party/mojo/src/mojo/edk", ] diff --git a/components/nacl/loader/nacl_helper_linux.cc b/components/nacl/loader/nacl_helper_linux.cc index 6670eb2..e7e75fb 100644 --- a/components/nacl/loader/nacl_helper_linux.cc +++ b/components/nacl/loader/nacl_helper_linux.cc @@ -43,11 +43,6 @@ #include "ipc/ipc_switches.h" #include "sandbox/linux/services/libc_urandom_override.h" -#if !defined(OS_NACL_NONSFI) -#include "third_party/mojo/src/mojo/edk/embedder/embedder.h" -#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h" -#endif - #if defined(OS_NACL_NONSFI) #include "native_client/src/public/nonsfi/irt_exception_handling.h" #else @@ -464,12 +459,6 @@ int main(int argc, char* argv[]) { CheckRDebug(argv[0]); #endif -// TODO(teravest): Enable mojo for nonsfi. http://crbug.com/473418 -#if !defined(OS_NACL_NONSFI) - mojo::embedder::Init( - make_scoped_ptr(new mojo::embedder::SimplePlatformSupport())); -#endif - scoped_ptr<nacl::NaClSandbox> nacl_sandbox(new nacl::NaClSandbox); // Make sure that the early initialization did not start any spurious // threads. diff --git a/components/nacl/loader/nacl_helper_win_64.cc b/components/nacl/loader/nacl_helper_win_64.cc index 7dfc376..d67b7b3 100644 --- a/components/nacl/loader/nacl_helper_win_64.cc +++ b/components/nacl/loader/nacl_helper_win_64.cc @@ -20,8 +20,6 @@ #include "content/public/common/main_function_params.h" #include "content/public/common/sandbox_init.h" #include "sandbox/win/src/sandbox_types.h" -#include "third_party/mojo/src/mojo/edk/embedder/embedder.h" -#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h" extern int NaClMain(const content::MainFunctionParams&); @@ -64,8 +62,6 @@ int NaClWin64Main() { // Route stdio to parent console (if any) or create one. if (command_line.HasSwitch(switches::kEnableLogging)) base::RouteStdioToConsole(); - mojo::embedder::Init( - make_scoped_ptr(new mojo::embedder::SimplePlatformSupport())); // Initialize the sandbox for this process. bool sandbox_initialized_ok = content::InitializeSandbox(&sandbox_info); diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc index 4cf4a3e..901c0c9 100644 --- a/components/nacl/loader/nacl_listener.cc +++ b/components/nacl/loader/nacl_listener.cc @@ -28,13 +28,9 @@ #include "ipc/ipc_switches.h" #include "ipc/ipc_sync_channel.h" #include "ipc/ipc_sync_message_filter.h" -#include "mojo/nacl/mojo_syscall.h" #include "native_client/src/public/chrome_main.h" #include "native_client/src/public/nacl_app.h" #include "native_client/src/public/nacl_desc.h" -#include "third_party/mojo/src/mojo/edk/embedder/embedder.h" -#include "third_party/mojo/src/mojo/edk/embedder/platform_support.h" -#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h" #if defined(OS_POSIX) #include "base/file_descriptor_posix.h" @@ -437,16 +433,6 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { args->nexe_desc = NaClDescCreateWithFilePathMetadata(nexe_file, file_path_str.c_str()); - if (params.enable_mojo) { - // InjectMojo adds a file descriptor to the process that allows Mojo calls - // to use an implementation defined outside the NaCl sandbox. See - // //mojo/nacl for implementation details. - InjectMojo(nap); - } else { - // When Mojo isn't enabled, we inject a file descriptor that intentionally - // fails on any imc_sendmsg() call to make debugging easier. - InjectDisabledMojo(nap); - } // TODO(yusukes): Support pre-opening resource files. CHECK(params.prefetched_resource_files.empty()); diff --git a/ppapi/nacl_irt/irt_ppapi.cc b/ppapi/nacl_irt/irt_ppapi.cc index a298a23..a9c13eb 100644 --- a/ppapi/nacl_irt/irt_ppapi.cc +++ b/ppapi/nacl_irt/irt_ppapi.cc @@ -5,7 +5,6 @@ #include <unistd.h> #include "build/build_config.h" -#include "mojo/nacl/mojo_irt.h" #include "native_client/src/public/irt_core.h" #include "native_client/src/trusted/service_runtime/include/sys/unistd.h" #include "native_client/src/untrusted/irt/irt.h" @@ -92,11 +91,5 @@ size_t chrome_irt_query(const char* interface_ident, if (result != 0) return result; -#if defined(OS_NACL_SFI) - result = mojo_irt_query(interface_ident, table, tablesize); - if (result != 0) - return result; -#endif - return nacl_irt_query_core(interface_ident, table, tablesize); } diff --git a/ppapi/native_client/BUILD.gn b/ppapi/native_client/BUILD.gn index 0cb4c00..488f44f 100644 --- a/ppapi/native_client/BUILD.gn +++ b/ppapi/native_client/BUILD.gn @@ -22,7 +22,6 @@ if (enable_nacl && enable_nacl_untrusted) { "//gpu/ipc", "//ipc", "//media:shared_memory_support", - "//mojo/nacl:irt_mojo_sources", "//native_client/src/untrusted/irt:irt_core_lib", "//native_client/src/shared/srpc", "//native_client/src/shared/platform", diff --git a/ppapi/ppapi_proxy_nacl.gyp b/ppapi/ppapi_proxy_nacl.gyp index 7740a4e..d015758 100644 --- a/ppapi/ppapi_proxy_nacl.gyp +++ b/ppapi/ppapi_proxy_nacl.gyp @@ -41,7 +41,6 @@ '../gpu/gpu_nacl.gyp:gpu_ipc_nacl', '../ipc/ipc_nacl.gyp:ipc_nacl', '../ipc/ipc_nacl.gyp:ipc_nacl_nonsfi', - '../mojo/mojo_nacl.gyp:monacl_codegen', '../ppapi/ppapi_ipc_nacl.gyp:ppapi_ipc_nacl', '../ppapi/ppapi_shared_nacl.gyp:ppapi_shared_nacl', '../third_party/WebKit/public/blink_headers.gyp:blink_headers', diff --git a/ppapi/ppapi_tests_mojo.gyp b/ppapi/ppapi_tests_mojo.gyp deleted file mode 100644 index 794a8b6..0000000 --- a/ppapi/ppapi_tests_mojo.gyp +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - 'ppapi_nacl_test_common.gypi', - ], - 'targets': [ - { - 'target_name': 'ppapi_tests_mojo', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_mojo', - # Only the pnacl toolchain can be used with mojo dependencies - # currently. - 'build_newlib': 0, - 'build_glibc': 0, - 'build_pnacl_newlib': 1, - # TODO(teravest): Build a translated nexe as well. - 'nexe_destination_dir': 'test_data/ppapi/tests/mojo', - 'sources': [ - 'tests/mojo/test_mojo.cc', - 'tests/mojo/test_mojo.h', - - # Test support files. - 'tests/test_case.cc', - 'tests/test_case.h', - 'tests/test_utils.cc', - 'tests/test_utils.h', - 'tests/testing_instance.cc', - 'tests/testing_instance.h', - ], - 'link_flags': [ - '-lmojo', - '-limc_syscalls', - '-lppapi_cpp', - '-lppapi', - ], - }, - 'dependencies': [ - '../mojo/mojo_nacl_untrusted.gyp:libmojo', - '../mojo/mojo_nacl.gyp:monacl_codegen', - '../native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib', - '../third_party/mojo/mojo_public.gyp:mojo_system_placeholder', - 'native_client/native_client.gyp:ppapi_lib', - 'ppapi_nacl.gyp:ppapi_cpp_lib', - ], - }, - ], -} diff --git a/ppapi/proxy/BUILD.gn b/ppapi/proxy/BUILD.gn index f3f07f3..8e26008 100644 --- a/ppapi/proxy/BUILD.gn +++ b/ppapi/proxy/BUILD.gn @@ -276,10 +276,7 @@ component("proxy") { ] if (is_nacl) { - deps += [ - "//ui/events:latency_info", - "//mojo/nacl:mojo", - ] + deps += [ "//ui/events:latency_info" ] } else { deps += [ "//base/third_party/dynamic_annotations", diff --git a/ppapi/tests/mojo/DEPS b/ppapi/tests/mojo/DEPS deleted file mode 100644 index 5f8633a..0000000 --- a/ppapi/tests/mojo/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+third_party/mojo/src/mojo/public", -] diff --git a/ppapi/tests/mojo/README b/ppapi/tests/mojo/README deleted file mode 100644 index d26906e..0000000 --- a/ppapi/tests/mojo/README +++ /dev/null @@ -1,4 +0,0 @@ -Pepper Mojo tests are split apart from the rest of the Pepper tests because: - - They require additional Mojo dependencies to work, and - - Mojo libraries require building with C++11 support, which is only supported - by pnacl-clang. diff --git a/ppapi/tests/mojo/test_mojo.cc b/ppapi/tests/mojo/test_mojo.cc deleted file mode 100644 index 3d1af46..0000000 --- a/ppapi/tests/mojo/test_mojo.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ppapi/tests/mojo/test_mojo.h" - -#include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h" - -REGISTER_TEST_CASE(Mojo); - -TestMojo::TestMojo(TestingInstance* instance) : TestCase(instance) { } -bool TestMojo::Init() { - return true; -} - -void TestMojo::RunTests(const std::string& filter) { - RUN_TEST(CreateMessagePipe, filter); -} - -std::string TestMojo::TestCreateMessagePipe() { - MojoHandle h0; - MojoHandle h1; - ASSERT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(NULL, &h0, &h1)); - PASS(); -} diff --git a/ppapi/tests/mojo/test_mojo.h b/ppapi/tests/mojo/test_mojo.h deleted file mode 100644 index cbf6a82..0000000 --- a/ppapi/tests/mojo/test_mojo.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef PPAPI_TESTS_MOJO_TEST_MOJO_H_ -#define PPAPI_TESTS_MOJO_TEST_MOJO_H_ - -#include "ppapi/tests/test_case.h" -#include "ppapi/tests/test_utils.h" - -class TestMojo : public TestCase { - public: - explicit TestMojo(TestingInstance* instance); - // TestCase implementation. - virtual bool Init(); - virtual void RunTests(const std::string& test_filter); - private: - std::string TestCreateMessagePipe(); -}; - -#endif // PPAPI_TESTS_MOJO_TEST_MOJO_H_ |