| Index: content/plugin/plugin_thread.cc
|
| diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc
|
| index 75a692e63ee8a700c10409d88df7335c88c21a72..970beccee8f6217e4b2e364a4bf6a01a307de8ce 100644
|
| --- a/content/plugin/plugin_thread.cc
|
| +++ b/content/plugin/plugin_thread.cc
|
| @@ -23,6 +23,7 @@
|
| #include "content/common/child_process.h"
|
| #include "content/common/npobject_util.h"
|
| #include "content/common/plugin_messages.h"
|
| +#include "content/public/common/content_debug_logging.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/plugin/content_plugin_client.h"
|
| #include "ipc/ipc_channel_handle.h"
|
| @@ -68,6 +69,17 @@ class EnsureTerminateMessageFilter : public IPC::ChannelProxy::MessageFilter {
|
| }
|
| };
|
|
|
| +void RecordMsg(int bug_id, const std::string& msg) {
|
| + PluginThread::current()->Send(
|
| + new PluginProcessHostMsg_RecordMsg(bug_id, msg));
|
| +}
|
| +
|
| +bool GetMessages(int bug_id, std::vector<std::string>* msgs) {
|
| + PluginThread::current()->Send(
|
| + new PluginProcessHostMsg_GetMessages(bug_id, msgs));
|
| + return !msgs->empty();
|
| +}
|
| +
|
| } // namespace
|
|
|
| static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls =
|
| @@ -107,6 +119,8 @@ PluginThread::PluginThread()
|
| ui::SetDefaultX11ErrorHandlers();
|
| #endif
|
|
|
| + content::debug::RegisterMessageHandlers(RecordMsg, GetMessages);
|
| +
|
| PatchNPNFunctions();
|
|
|
| // Preload the library to avoid loading, unloading then reloading
|
| @@ -177,6 +191,11 @@ void PluginThread::OnCreateChannel(int renderer_id,
|
| channel->set_incognito(incognito);
|
| }
|
|
|
| +#if defined(OS_MACOSX)
|
| + content::debug::RecordMsg(97285, base::StringPrintf(
|
| + "OnCreateChannel({%s, %d})",
|
| + channel_handle.name.c_str(), channel_handle.socket.fd));
|
| +#endif
|
| Send(new PluginProcessHostMsg_ChannelCreated(channel_handle));
|
| }
|
|
|
|
|