diff options
author | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-21 20:04:06 +0000 |
---|---|---|
committer | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-21 20:04:06 +0000 |
commit | 5ca93bef094ace0fcc1856437776d95c9809157d (patch) | |
tree | c283aa4aa5955ebd952d067474b434c3d1a18dad /chrome/nacl | |
parent | f04c1b203cf4c40071a17ef667bfff287f31bdb9 (diff) | |
download | chromium_src-5ca93bef094ace0fcc1856437776d95c9809157d.zip chromium_src-5ca93bef094ace0fcc1856437776d95c9809157d.tar.gz chromium_src-5ca93bef094ace0fcc1856437776d95c9809157d.tar.bz2 |
NaCl: Allow hardware exception handling to be enabled on Linux and Mac
On Linux and Mac, enabling exception handling is just a matter of
passing a flag through to NaClChromeMainStart().
This change also fixes exception handling on x86-32 Windows, which we
broke a while ago when we made the exception handling syscalls
conditionally enabled on the NaCl side.
Exception handling on x86-64 Windows will require further work to hook
up the debug helper process. Because of this, and because x86-32
Windows is not covered by the Chromium trybots, I'm not enabling
NaCl's exception handling test for Windows yet.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=2651
TEST=run_inbrowser_exception_test in nacl_integration
Review URL: http://codereview.chromium.org/9724002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/nacl_listener.cc | 4 | ||||
-rw-r--r-- | chrome/nacl/nacl_listener.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc index bcf8ee6..d4a4717 100644 --- a/chrome/nacl/nacl_listener.cc +++ b/chrome/nacl/nacl_listener.cc @@ -88,7 +88,8 @@ bool NaClListener::OnMessageReceived(const IPC::Message& msg) { return handled; } -void NaClListener::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) { +void NaClListener::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles, + bool enable_exception_handling) { struct NaClChromeMainArgs *args = NaClChromeMainArgsCreate(); if (args == NULL) { LOG(ERROR) << "NaClChromeMainArgsCreate() failed"; @@ -121,6 +122,7 @@ void NaClListener::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) { CHECK(handles.size() == 1); args->imc_bootstrap_handle = nacl::ToNativeHandle(handles[0]); + args->enable_exception_handling = enable_exception_handling; args->enable_debug_stub = debug_enabled_; NaClChromeMainStart(args); NOTREACHED(); diff --git a/chrome/nacl/nacl_listener.h b/chrome/nacl/nacl_listener.h index 0c55c27..2738d7b 100644 --- a/chrome/nacl/nacl_listener.h +++ b/chrome/nacl/nacl_listener.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -22,7 +22,8 @@ class NaClListener : public IPC::Channel::Listener { void set_debug_enabled(bool value) {debug_enabled_ = value;} private: - void OnStartSelLdr(std::vector<nacl::FileDescriptor> handles); + void OnStartSelLdr(std::vector<nacl::FileDescriptor> handles, + bool enable_exception_handling); virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; bool debug_enabled_; |