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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper.h
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h
index 954107f1590a6b0816146b93dfeb6d2fb9199758..d10a5546ed9abad646ef42849cde9d342d8dd5df 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.h
+++ b/gpu/command_buffer/client/cmd_buffer_helper.h
@@ -137,11 +137,12 @@ class GPU_EXPORT CommandBufferHelper {
template <typename T>
void ForceNullCheck(T* data) {
-#if defined(OS_WIN) && defined(ARCH_CPU_64_BITS)
+#if defined(COMPILER_MSVC) && defined(ARCH_CPU_64_BITS) && !defined(__clang__)
// 64-bit MSVC's alias analysis was determining that the command buffer
// entry couldn't be NULL, so it optimized out the NULL check.
// Dereferencing the same datatype through a volatile pointer seems to
// prevent that from happening. http://crbug.com/361936
+ // TODO(jbauman): Remove once we're on VC2015, http://crbug.com/412902
if (data)
static_cast<volatile T*>(data)->header;
#endif
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698