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

Unified Diff: components/nacl/common/nacl_types.h

Issue 469423002: NaCl: Send fatal log messages via shared memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for mseaborn Created 6 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
Index: components/nacl/common/nacl_types.h
diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h
index 6aea0908d687050e07848016f74aaedf79538bb4..c02659806c311538241a6217149a2ff0423eb37d 100644
--- a/components/nacl/common/nacl_types.h
+++ b/components/nacl/common/nacl_types.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/memory/shared_memory.h"
#include "base/process/process_handle.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"
@@ -37,6 +38,10 @@ inline int ToNativeHandle(const FileDescriptor& desc) {
}
#endif
+// We allocate a page of shared memory for sharing crash information between
+// the plugin and the renderer.
Mark Seaborn 2014/08/18 19:04:08 How about: "from trusted code in the NaCl process
teravest 2014/08/19 19:58:16 Done.
+static const int kNaClCrashInfoShmemSize = 4096;
+static const int kNaClCrashInfoMaxLogSize = 1024;
// Parameters sent to the NaCl process when we start it.
struct NaClStartParams {
@@ -63,6 +68,9 @@ struct NaClStartParams {
bool uses_irt;
bool enable_dyncode_syscalls;
+ // For plugin <-> renderer crash information reporting.
Mark Seaborn 2014/08/18 19:04:09 "NaCl -> renderer"
teravest 2014/08/19 19:58:16 Done.
+ base::SharedMemoryHandle crash_info_shmem_handle;
+
// NOTE: Any new fields added here must also be added to the IPC
// serialization in nacl_messages.h and (for POD fields) the constructor
// in nacl_types.cc.
@@ -112,7 +120,8 @@ struct NaClLaunchResult {
const IPC::ChannelHandle& trusted_ipc_channel_handle,
const IPC::ChannelHandle& manifest_service_ipc_channel_handle,
base::ProcessId plugin_pid,
- int plugin_child_id);
+ int plugin_child_id,
+ base::SharedMemoryHandle crash_info_shmem_handle);
~NaClLaunchResult();
// For plugin loader <-> renderer IMC communication.
@@ -130,6 +139,9 @@ struct NaClLaunchResult {
base::ProcessId plugin_pid;
int plugin_child_id;
+
+ // For plugin <-> renderer crash information reporting.
Mark Seaborn 2014/08/18 19:04:08 Ditto
teravest 2014/08/19 19:58:16 Done.
+ base::SharedMemoryHandle crash_info_shmem_handle;
};
} // namespace nacl

Powered by Google App Engine
This is Rietveld 408576698