mfbt/double-conversion/use-mozilla-assertions.patch

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
michael@0 2 --- a/mfbt/double-conversion/utils.h
michael@0 3 +++ b/mfbt/double-conversion/utils.h
michael@0 4 @@ -31,15 +31,15 @@
michael@0 5 #include <stdlib.h>
michael@0 6 #include <string.h>
michael@0 7
michael@0 8 -#include <assert.h>
michael@0 9 +#include "mozilla/Assertions.h"
michael@0 10 #ifndef ASSERT
michael@0 11 -#define ASSERT(condition) (assert(condition))
michael@0 12 +#define ASSERT(condition) MOZ_ASSERT(condition)
michael@0 13 #endif
michael@0 14 #ifndef UNIMPLEMENTED
michael@0 15 -#define UNIMPLEMENTED() (abort())
michael@0 16 +#define UNIMPLEMENTED() MOZ_CRASH()
michael@0 17 #endif
michael@0 18 #ifndef UNREACHABLE
michael@0 19 -#define UNREACHABLE() (abort())
michael@0 20 +#define UNREACHABLE() MOZ_CRASH()
michael@0 21 #endif
michael@0 22
michael@0 23 // Double operations detection based on target architecture.

mercurial