| Index: content/gpu/gpu_child_thread.cc
|
| diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
|
| index a1076a99dcf5aa0ac59768c094f6a3d057d3c841..9a16b63b3c6b7189a523d28f586ec383c80a9c61 100644
|
| --- a/content/gpu/gpu_child_thread.cc
|
| +++ b/content/gpu/gpu_child_thread.cc
|
| @@ -61,14 +61,12 @@ static base::LazyInstance<scoped_refptr<ThreadSafeSender> >
|
| g_thread_safe_sender = LAZY_INSTANCE_INITIALIZER;
|
|
|
| bool GpuProcessLogMessageHandler(int severity,
|
| - const char* file, int line,
|
| - size_t message_start,
|
| + const std::string& file,
|
| + int line,
|
| const std::string& str) {
|
| - std::string header = str.substr(0, message_start);
|
| - std::string message = str.substr(message_start);
|
| -
|
| + std::string header = file + "(" + std::to_string(line) + "):";
|
| g_thread_safe_sender.Get()->Send(
|
| - new GpuHostMsg_OnLogMessage(severity, header, message));
|
| + new GpuHostMsg_OnLogMessage(severity, header, str));
|
|
|
| return false;
|
| }
|
| @@ -195,7 +193,8 @@ GpuChildThread::~GpuChildThread() {
|
|
|
| void GpuChildThread::Shutdown() {
|
| ChildThreadImpl::Shutdown();
|
| - logging::SetLogMessageHandler(NULL);
|
| + if (!in_browser_process_)
|
| + logging::RemoveLogMessageHandler(GpuProcessLogMessageHandler);
|
| }
|
|
|
| void GpuChildThread::Init(const base::Time& process_start_time) {
|
| @@ -333,7 +332,7 @@ void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) {
|
| // We don't need to pipe log messages if we are running the GPU thread in
|
| // the browser process.
|
| if (!in_browser_process_)
|
| - logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
|
| + logging::AddLogMessageHandler(GpuProcessLogMessageHandler);
|
|
|
| gpu::SyncPointManager* sync_point_manager = nullptr;
|
| // Note SyncPointManager from ContentGpuClient cannot be owned by this.
|
|
|