| Index: content/gpu/gpu_child_thread.cc
|
| diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
|
| index a0ba2b6bcdb30e2a123819c408b0fc8cfdf663f1..10201cabd226c2c7eaee72b22891eb4592745abf 100644
|
| --- a/content/gpu/gpu_child_thread.cc
|
| +++ b/content/gpu/gpu_child_thread.cc
|
| @@ -146,12 +146,12 @@ GpuChildThread::GpuChildThread(
|
| gpu::GpuWatchdogThread* watchdog_thread,
|
| bool dead_on_arrival,
|
| const gpu::GPUInfo& gpu_info,
|
| - const DeferredMessages& deferred_messages,
|
| + std::vector<gpu::GpuInitLogMessage> deferred_messages,
|
| gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory)
|
| : ChildThreadImpl(GetOptions(gpu_memory_buffer_factory)),
|
| dead_on_arrival_(dead_on_arrival),
|
| gpu_info_(gpu_info),
|
| - deferred_messages_(deferred_messages),
|
| + deferred_messages_(std::move(deferred_messages)),
|
| in_browser_process_(false),
|
| gpu_memory_buffer_factory_(gpu_memory_buffer_factory) {
|
| watchdog_thread_ = watchdog_thread;
|
| @@ -190,12 +190,7 @@ GpuChildThread::GpuChildThread(
|
| g_thread_safe_sender.Get() = thread_safe_sender();
|
| }
|
|
|
| -GpuChildThread::~GpuChildThread() {
|
| - while (!deferred_messages_.empty()) {
|
| - delete deferred_messages_.front();
|
| - deferred_messages_.pop();
|
| - }
|
| -}
|
| +GpuChildThread::~GpuChildThread() {}
|
|
|
| void GpuChildThread::Shutdown() {
|
| ChildThreadImpl::Shutdown();
|
| @@ -331,10 +326,9 @@ void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) {
|
| // take a significant amount of time.
|
| gpu_info_.initialization_time = base::Time::Now() - process_start_time_;
|
| Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_info_));
|
| - while (!deferred_messages_.empty()) {
|
| - Send(deferred_messages_.front());
|
| - deferred_messages_.pop();
|
| - }
|
| + for (const auto& msg : deferred_messages_)
|
| + Send(new GpuHostMsg_OnLogMessage(msg.severity, msg.header, msg.message));
|
| + deferred_messages_.clear();
|
|
|
| if (dead_on_arrival_) {
|
| LOG(ERROR) << "Exiting GPU process due to errors during initialization";
|
|
|