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

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial