summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/test/ppapi/ppapi_browsertest.cc10
-rw-r--r--components/nacl.gyp1
-rw-r--r--components/nacl/loader/nacl_helper_linux.cc11
-rw-r--r--components/nacl/loader/nacl_helper_win_64.cc4
-rw-r--r--components/nacl/loader/nacl_listener.cc10
5 files changed, 18 insertions, 18 deletions
diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc
index 8f6a571..8d5c92a 100644
--- a/chrome/test/ppapi/ppapi_browsertest.cc
+++ b/chrome/test/ppapi/ppapi_browsertest.cc
@@ -1452,17 +1452,11 @@ class MojoPPAPITest : public InProcessBrowserTest {
std::string result_;
};
-#if defined(OS_POSIX)
-#define MAYBE_MOJO(test_name) test_name
-#else
-#define MAYBE_MOJO(test_name) DISABLED_##test_name
-#endif
-
-IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(Mojo)) {
+IN_PROC_BROWSER_TEST_F(MojoPPAPITest, Mojo) {
RunTest();
}
-IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(MojoFailsWithoutFlag)) {
+IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MojoFailsWithoutFlag) {
RunTestWithoutFlag();
}
#endif
diff --git a/components/nacl.gyp b/components/nacl.gyp
index df9c827..5888d75 100644
--- a/components/nacl.gyp
+++ b/components/nacl.gyp
@@ -227,6 +227,7 @@
],
'dependencies': [
'nacl_linux',
+ '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
],
'cflags': ['-fPIE'],
'ldflags!': [
diff --git a/components/nacl/loader/nacl_helper_linux.cc b/components/nacl/loader/nacl_helper_linux.cc
index 3ad69b3..7076044 100644
--- a/components/nacl/loader/nacl_helper_linux.cc
+++ b/components/nacl/loader/nacl_helper_linux.cc
@@ -43,6 +43,11 @@
#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
@@ -459,6 +464,12 @@ 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 d67b7b3..7dfc376 100644
--- a/components/nacl/loader/nacl_helper_win_64.cc
+++ b/components/nacl/loader/nacl_helper_win_64.cc
@@ -20,6 +20,8 @@
#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&);
@@ -62,6 +64,8 @@ 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 424112e..1a2b894 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -428,14 +428,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
args->nexe_desc = NaClDescCreateWithFilePathMetadata(nexe_file,
file_path_str.c_str());
-#if defined(OS_POSIX)
if (params.enable_mojo) {
-#if !defined(OS_MACOSX)
- // Don't call mojo::embedder::Init on Mac; it's already been called from
- // ChromeMain() (see chrome/app/chrome_exe_main_mac.cc).
- mojo::embedder::Init(make_scoped_ptr(
- new mojo::embedder::SimplePlatformSupport()));
-#endif
// 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.
@@ -445,9 +438,6 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
// fails on any imc_sendmsg() call to make debugging easier.
InjectDisabledMojo(nap);
}
-#else
- InjectDisabledMojo(nap);
-#endif
// TODO(yusukes): Support pre-opening resource files.
CHECK(params.prefetched_resource_files.empty());