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

Side by Side Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 2143913002: Check for GpuChannelHost nullity in GetGpuDriverBugWorkarounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/gpu/gpu_benchmarking_extension.h" 5 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 new ChildProcessHostMsg_HasGpuProcess(&has_gpu_process))) 948 new ChildProcessHostMsg_HasGpuProcess(&has_gpu_process)))
949 return false; 949 return false;
950 950
951 return has_gpu_process; 951 return has_gpu_process;
952 } 952 }
953 953
954 void GpuBenchmarking::GetGpuDriverBugWorkarounds(gin::Arguments* args) { 954 void GpuBenchmarking::GetGpuDriverBugWorkarounds(gin::Arguments* args) {
955 std::vector<std::string> gpu_driver_bug_workarounds; 955 std::vector<std::string> gpu_driver_bug_workarounds;
956 gpu::GpuChannelHost* gpu_channel = 956 gpu::GpuChannelHost* gpu_channel =
957 RenderThreadImpl::current()->GetGpuChannel(); 957 RenderThreadImpl::current()->GetGpuChannel();
958 if (!gpu_channel->Send(new GpuChannelMsg_GetDriverBugWorkArounds( 958 if (!gpu_channel ||
959 !gpu_channel->Send(new GpuChannelMsg_GetDriverBugWorkArounds(
959 &gpu_driver_bug_workarounds))) { 960 &gpu_driver_bug_workarounds))) {
960 return; 961 return;
961 } 962 }
962 963
963 v8::Local<v8::Value> result; 964 v8::Local<v8::Value> result;
964 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) 965 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result))
965 args->Return(result); 966 args->Return(result);
966 } 967 }
967 968
968 } // namespace content 969 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698