Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1646)

Unified Diff: shell/out_of_process_native_runner.cc

Issue 1341873002: Enabling 64-bit mojo shell to launch 32-bit child to handle nonsfi content. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« shell/context.cc ('K') | « shell/context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/out_of_process_native_runner.cc
diff --git a/shell/out_of_process_native_runner.cc b/shell/out_of_process_native_runner.cc
index 39cf1f7003abfef747ed59f21afdebf9d08b04ab..fe1bdfa4b61e90fe51ce39817df694860368dd64 100644
--- a/shell/out_of_process_native_runner.cc
+++ b/shell/out_of_process_native_runner.cc
@@ -4,10 +4,13 @@
#include "shell/out_of_process_native_runner.h"
+#include <string>
+
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/strings/string_util.h"
#include "shell/child_controller.mojom.h"
#include "shell/child_process_host.h"
#include "shell/in_process_native_runner.h"
@@ -37,7 +40,10 @@ void OutOfProcessNativeRunner::Start(
app_completed_callback_ = app_completed_callback;
child_process_host_.reset(new ChildProcessHost(context_));
- child_process_host_->Start();
+ bool require_32_bit = false;
+ if (EndsWith(app_path.value(), "nacl_content_handler_nonsfi.mojo", true))
+ require_32_bit = true;
Sean Klein 2015/09/14 18:10:34 I am fully aware this is kind of hacky -- mojo peo
Mark Seaborn 2015/09/14 18:38:59 I think it's up to an owner of this code whether t
Sean Klein 2015/09/15 18:37:50 Modified to check ELF header of content handler. A
Mark Seaborn 2015/09/15 19:42:58 Yes, checking for "\x7fELF" would be good, to ensu
+ child_process_host_->Start(require_32_bit);
// TODO(vtl): |app_path.AsUTF8Unsafe()| is unsafe.
child_process_host_->StartApp(
« shell/context.cc ('K') | « shell/context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698