Commit Graph

26 Commits

Author SHA1 Message Date
Birunthan Mohanathas
c8d9f9225c Bug 784739 - Switch from NULL to nullptr in toolkit/; r=ehsan 2013-10-10 16:36:42 -04:00
Ehsan Akhgari
dee6c12c6f Bug 918923 - Part 2: Switch to #including nsString.h in code using the internal strings API; r=bsmedberg 2013-09-23 13:25:00 -04:00
Ehsan Akhgari
085494b95d Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Joshua Cranmer
535f68a222 Bug 884061 - Part 3v: Use NS_DECL_THREADSAFE_ISUPPORTS in toolkit/, r=Mossop
--HG--
extra : rebase_source : ad2b2f20219b42b192c313b6fa9da3383f904805
2013-07-18 21:24:15 -05:00
Jed Parsons
e40de2b419 Bug 778817 - Add and expose Base64UrlDecode in IdentityCryptoService. r=benadida, r=bsmith 2013-07-08 16:34:33 -04:00
Justin Lebar
09d2312322 Bug 820686 - Remove code after MOZ_CRASH or MOZ_ASSUME_NOT_REACHED. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=waldo for js
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else
2013-06-28 18:38:32 -07:00
Justin Lebar
cab87a0cce Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else

This is a mechanical change made with sed.  Later patches in this queue
clean up the whitespace errors and so on.
2013-06-28 18:38:30 -07:00
Josh Matthews
40e7c14af0 Bug 869893 - Remove Off-Main-Thread XPCWrappedJS refcounting from SignRunnable. r=jedp 2013-05-08 10:50:36 -04:00
Bobby Holley
825b42fa01 Bug 850253 - Remove Off-Main-Thread XPCWrappedJS refcounting from KeyGenRunnable. r=jedp 2013-04-11 14:05:35 -07:00
Ms2ger
69401c3aeb Bug 845374 - Part s: Stop including nsTArray.h in nsContentUtils.h; r=khuey 2013-03-17 08:55:16 +01:00
Chris Peterson
d2b4e410e5 Bug 785918 - Part 1: Replace PR_ARRAY_SIZE() with mozilla::ArrayLength() and MOZ_ARRAY_LENGTH(). r=ehsan 2013-01-05 23:37:25 -08:00
Brian Smith
9087077a80 Bug 804663: Create a CryptoTask API to simplify the creation of correct async crypto operations and add more utilities to ScopedNSSTypes.h, r=honzab
--HG--
extra : rebase_source : de29f383e6d5b109a06837b887d96bbcbce55817
2012-07-13 15:44:24 -07:00
Brian Smith
594736d869 Backed out changeset 84bf2e19c701
--HG--
extra : rebase_source : 446249323b44e54161bf187c0d386db645402bb7
2012-11-30 19:39:46 -08:00
Brian Smith
e51024bde5 Bug 804663: Create a CryptoTask API to simplify the creation of correct async crypto operations and add more utilities to ScopedNSSTypes.h, r=honzab 2012-07-13 15:44:24 -07:00
Brian Smith
f54dc1694d Backed out changeset ef6db4ced917 (bug 804663) due to build bustage, a=bustage
--HG--
extra : rebase_source : 20d434a5f205052e836e059bcee57a0bf84725c4
2012-11-19 20:24:47 -08:00
Brian Smith
11b18b39eb Bug 804663: Add a CryptoTask class for asynchronous crypto operations and add more utilities to ScopedNSSTypes.h
--HG--
extra : source : cc195997c6e526ce4b64d28cfb065d671b90bdba
2012-07-13 15:44:24 -07:00
Ehsan Akhgari
78b2656cbc Backed out 2 changesets (bug 579517)
Backed out changeset 5298adc70963
Backed out changeset 86ccf7c918ce (bug 579517)
2012-10-25 12:32:24 -04:00
Ehsan Akhgari
03be701616 Code hygiene: don't use PR_TRUE and PR_FALSE, and use stdint types instead of PRInt types (no bug really, but you could say bug 579517) 2012-10-25 11:48:19 -04:00
Benjamin Peterson
44f6340ff8 backout 5f9951a2e6df (bug 785918) for breaking on osx 2012-09-25 10:24:09 -04:00
José Guilherme Vanz
b12bfcbd0f Bug 785918 - Replace the usages of PR_ARRAY_SIZE with mozilla::ArrayLength; r=ehsan 2012-09-25 09:57:08 -04:00
Ehsan Akhgari
8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
7bf9fe596b Bug 777292 - Add casts and annoyed comments where we make up nsresult codes on the fly; r=ehsan 2012-07-27 17:03:25 +03:00
Joshua Cranmer
e1cdfe2f05 Bug 773637 - Kill NS_SCRIPTABLE annotations, Part 1: Remove NS_*PARAM annotations. r=ehsan
--HG--
extra : rebase_source : a0b4bc50fece36d9a90fed61431635948bfa33b5
2012-07-06 15:14:07 -05:00
Rafael Ávila de Espíndola
6d6cccf3d5 Bug 774037 - Fix -Wdelete-non-virtual-dtor warning. r=dolske. 2012-07-15 00:23:35 -04:00
Gavin Sharp
10fea41388 Bug 753238 bustage fix: fix uninitialized variable use, and clang build error (error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]), irc-r=jlebar 2012-07-07 23:07:26 -07:00
Jed Parsons
93a9f18281 Bug 753238 - Identity (BrowserID) module. r=dolske,rrelyea
--HG--
extra : rebase_source : 33ff0f0248ef84f3f4c8154745e5988819f2b787
2012-07-03 14:53:37 -07:00