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

Unified Diff: src/shared/ppapi_proxy/plugin_globals.cc

Issue 7605029: Extend IRT with nacl_irt_resource_open interface (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: fixed license Created 9 years, 4 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
« no previous file with comments | « no previous file | src/shared/ppapi_proxy/ppruntime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ppapi_proxy/plugin_globals.cc
===================================================================
--- src/shared/ppapi_proxy/plugin_globals.cc (revision 6452)
+++ src/shared/ppapi_proxy/plugin_globals.cc (working copy)
@@ -155,29 +155,23 @@
thread_funcs = *new_funcs;
}
-int PpapiPluginMain() {
- if (getenv("NACL_LD_ACCEPTS_PLUGIN_CONNECTION") != NULL) {
- // Send a message to the page to ask it to reinitialise the
- // plugin's SRPC/PPAPI connection. This triggers a call to
- // __startSrpcServices() which in turn calls
- // StartProxiedExecution() which sets up the PPAPI proxy. This is
- // necessary because LoadNaClModule()'s earlier call to
- // StartSrpcServices() was matched by the dynamic linker before
- // libppruntime was available.
- // For background, see:
- // http://code.google.com/p/nativeclient/issues/detail?id=617
- // http://code.google.com/p/nativeclient/issues/detail?id=1501
- // TODO(mseaborn): This is a temporary measure. Find a less hacky
- // way to do this.
- struct NaClImcMsgIoVec iov = { const_cast<char*>("Init"), 4 };
- struct NaClImcMsgHdr message = { &iov, 1, NULL, 0, 0 };
- imc_sendmsg(NACL_SEND_FD, &message, 0);
+int IrtInit() {
+ // TODO(halyavin): this is needed for tests without IRT. They do not start
+ // in irt_entry.c where IrtInit is called.
+ static int initialized = 0;
+ if (initialized) {
+ return 0;
}
-
if (!NaClSrpcModuleInit()) {
return 1;
}
NaClLogModuleInit(); // Enable NaClLog'ing used by CHECK().
+ initialized = 1;
+ return 0;
+}
+
+int PpapiPluginMain() {
+ IrtInit();
PpapiPluginRegisterDefaultThreadCreator();
// Designate this as the main thread for PPB_Core::IsMainThread().
ppapi_proxy::PluginCore::MarkMainThread();
« no previous file with comments | « no previous file | src/shared/ppapi_proxy/ppruntime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698