[tor-commits] [tor-browser/esr24] Bug 991981 - Replace a few C++11 static_asserts with MOZ_STATIC_ASSERT -- can't use the other on this branch. r=trivial, a=bustage

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:41 UTC 2014


commit 155c4c79792c997b8d707d9a1a110ace6dd02881
Author: Jeff Walden <jwalden at mit.edu>
Date:   Mon Jun 2 17:45:14 2014 -0700

    Bug 991981 - Replace a few C++11 static_asserts with MOZ_STATIC_ASSERT -- can't use the other on this branch.  r=trivial, a=bustage
---
 content/base/src/WebSocket.cpp        |    4 ++--
 content/base/src/nsDOMDataChannel.cpp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/content/base/src/WebSocket.cpp b/content/base/src/WebSocket.cpp
index 2953aa3..1388884 100644
--- a/content/base/src/WebSocket.cpp
+++ b/content/base/src/WebSocket.cpp
@@ -1223,7 +1223,7 @@ WebSocket::Send(ArrayBuffer& aData,
 
   aData.ComputeLengthAndData();
 
-  static_assert(sizeof(*aData.Data()) == 1, "byte-sized data required");
+  MOZ_STATIC_ASSERT(sizeof(*aData.Data()) == 1, "byte-sized data required");
 
   uint32_t len = aData.Length();
   char* data = reinterpret_cast<char*>(aData.Data());
@@ -1240,7 +1240,7 @@ WebSocket::Send(ArrayBufferView& aData,
 
   aData.ComputeLengthAndData();
 
-  static_assert(sizeof(*aData.Data()) == 1, "byte-sized data required");
+  MOZ_STATIC_ASSERT(sizeof(*aData.Data()) == 1, "byte-sized data required");
 
   uint32_t len = aData.Length();
   char* data = reinterpret_cast<char*>(aData.Data());
diff --git a/content/base/src/nsDOMDataChannel.cpp b/content/base/src/nsDOMDataChannel.cpp
index a7f4d93..bfc6e2c 100644
--- a/content/base/src/nsDOMDataChannel.cpp
+++ b/content/base/src/nsDOMDataChannel.cpp
@@ -294,7 +294,7 @@ nsDOMDataChannel::Send(ArrayBuffer& aData, ErrorResult& aRv)
 
   aData.ComputeLengthAndData();
 
-  static_assert(sizeof(*aData.Data()) == 1, "byte-sized data required");
+  MOZ_STATIC_ASSERT(sizeof(*aData.Data()) == 1, "byte-sized data required");
 
   uint32_t len = aData.Length();
   char* data = reinterpret_cast<char*>(aData.Data());
@@ -310,7 +310,7 @@ nsDOMDataChannel::Send(ArrayBufferView& aData, ErrorResult& aRv)
 
   aData.ComputeLengthAndData();
 
-  static_assert(sizeof(*aData.Data()) == 1, "byte-sized data required");
+  MOZ_STATIC_ASSERT(sizeof(*aData.Data()) == 1, "byte-sized data required");
 
   uint32_t len = aData.Length();
   char* data = reinterpret_cast<char*>(aData.Data());





More information about the tor-commits mailing list