summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy
diff options
context:
space:
mode:
authorhidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 19:11:07 +0000
committerhidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 19:11:07 +0000
commit6e6a46c54e75acc9d3fdf8837f4e483e2a35da02 (patch)
treeb87c6e5120c241cc60608a317c5a9393a6b769b0 /ppapi/proxy
parent896955de48930899c6c43f24af45ced7af96c5f5 (diff)
downloadchromium_src-6e6a46c54e75acc9d3fdf8837f4e483e2a35da02.zip
chromium_src-6e6a46c54e75acc9d3fdf8837f4e483e2a35da02.tar.gz
chromium_src-6e6a46c54e75acc9d3fdf8837f4e483e2a35da02.tar.bz2
Fix DCHECK errors on non-SFI mode.
This CL is extracted from crrev.com/189553005. The fixes are: 1) AtExitManager is conflicting. In non-SFI mode, AtExitManager is already instantiated in nacl_helper. To avoid the conflicting, skip to create it in plugin_main_irt.cc. 2) Allowed creating Singleton on the plugin's main thread. 3) SRPC may be successfully done, and then NOTREACHED catch it in nacl_listener. It is false alarm, so removed it. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734 TETS=Run trybots. Review URL: https://codereview.chromium.org/206033006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r--ppapi/proxy/plugin_main_irt.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/proxy/plugin_main_irt.cc b/ppapi/proxy/plugin_main_irt.cc
index a3ea6c1..ae03884 100644
--- a/ppapi/proxy/plugin_main_irt.cc
+++ b/ppapi/proxy/plugin_main_irt.cc
@@ -14,7 +14,6 @@
// IPC_MESSAGE_MACROS_LOG_ENABLED so ppapi_messages.h will generate the
// ViewMsgLog et al. functions.
-#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -36,6 +35,7 @@
#include "ppapi/shared_impl/ppb_audio_shared.h"
#if defined(__native_client__)
+#include "base/at_exit.h"
#include "native_client/src/public/chrome_main.h"
#include "native_client/src/shared/srpc/nacl_srpc.h"
#endif
@@ -327,8 +327,12 @@ void PpapiPluginRegisterThreadCreator(
}
int PpapiPluginMain() {
+ // For non-SFI mode, the manager is already instantiated in nacl_helper,
+ // so we do not need to instantiate it here.
+#if defined(__native_client__)
// Though it isn't referenced here, we must instantiate an AtExitManager.
base::AtExitManager exit_manager;
+#endif
base::MessageLoop loop;
#if defined(IPC_MESSAGE_LOG_ENABLED)
IPC::Logging::set_log_function_map(&g_log_function_mapping);