OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 gpu_channel_->DestroyChannel(); | 1773 gpu_channel_->DestroyChannel(); |
1774 gpu_channel_ = NULL; | 1774 gpu_channel_ = NULL; |
1775 } | 1775 } |
1776 | 1776 |
1777 // Ask the browser for the channel name. | 1777 // Ask the browser for the channel name. |
1778 int client_id = 0; | 1778 int client_id = 0; |
1779 IPC::ChannelHandle channel_handle; | 1779 IPC::ChannelHandle channel_handle; |
1780 gpu::GPUInfo gpu_info; | 1780 gpu::GPUInfo gpu_info; |
1781 if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( | 1781 if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( |
1782 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || | 1782 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || |
1783 #if defined(OS_POSIX) | 1783 !channel_handle.mojo_handle.is_valid()) { |
1784 channel_handle.socket.fd == -1 || | |
1785 #endif | |
1786 channel_handle.name.empty()) { | |
1787 // Otherwise cancel the connection. | 1784 // Otherwise cancel the connection. |
1788 return NULL; | 1785 return NULL; |
1789 } | 1786 } |
1790 | 1787 |
1791 GetContentClient()->SetGpuInfo(gpu_info); | 1788 GetContentClient()->SetGpuInfo(gpu_info); |
1792 | 1789 |
1793 // Cache some variables that are needed on the compositor thread for our | 1790 // Cache some variables that are needed on the compositor thread for our |
1794 // implementation of GpuChannelHostFactory. | 1791 // implementation of GpuChannelHostFactory. |
1795 io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); | 1792 io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); |
1796 | 1793 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2214 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
2218 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2215 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
2219 | 2216 |
2220 blink::mainThreadIsolate()->MemoryPressureNotification( | 2217 blink::mainThreadIsolate()->MemoryPressureNotification( |
2221 v8_memory_pressure_level); | 2218 v8_memory_pressure_level); |
2222 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2219 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
2223 v8_memory_pressure_level); | 2220 v8_memory_pressure_level); |
2224 } | 2221 } |
2225 | 2222 |
2226 } // namespace content | 2223 } // namespace content |
OLD | NEW |