Commit Graph

73 Commits

Author SHA1 Message Date
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
f44c71b4ef Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands.
--HG--
extra : rebase_source : b8eaae07c54c94c8c46c7ed4c0e226eb74584652
2013-07-18 21:21:20 -05:00
David Zbarsky
d7ff0ef7d9 Bug 879475 - Make PBlob manually keep track of its manager r=jlebar 2013-07-16 13:07:09 -07:00
David Zbarsky
5719801b21 Bug 885804: Blob changes r=jlebar 2013-07-08 11:48:40 -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
Ben Turner
41e73faa1a Bug 839261 - 'Assertion failure: false (Remote blob didn
't return a remote stream)'. r=sicking.
2013-02-15 13:39:43 -08:00
Ben Turner
72bdb2945a Bug 832419 - 'Clean up IPC blobs'. r=sicking. 2013-01-17 12:17:33 -08:00
Kyle Huey
cac6c9919a Bug 806503: Add a semicolon. r=me 2013-01-10 08:28:34 -08:00
Kyle Huey
094d5d52f1 Bug 806503: Eagerly transmit blob data across processes so that it is available if the originating process dies. r=bent a=bb+ 2013-01-10 05:47:32 -08:00
Ed Morley
9fce0eda54 Backout 1391e924e9ee (bug 806503) for mochitest-1 failures on a CLOSED TREE 2013-01-10 15:21:39 +00:00
Kyle Huey
98ecfda689 Bug 806503: Eagerly transmit blob data across processes so that it is available if the originating process dies. r=bent a=bb+ 2013-01-10 05:47:32 -08:00
Jeff Walden
e0523203c9 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Ben Turner
087c5ca89f Bug 782766 - [WebActivities] support blobs - Part 2: IPC changes [r=khuey]
--HG--
extra : rebase_source : 0b6e2e7745e716994d305f4e29ade68c71826481
2012-10-25 11:45:15 -07:00
Doug Turner
4a040cfbad Bug 793955, 802867 - DeviceStorage files returned by DeviceStorage.get() don't always have lastModifiedDate. r=bent. a=blocking-basecamp 2012-10-18 11:29:32 -07:00
Josh Matthews
ffcba39f60 Bug 783878 - Part 2: Allow serializing remote input streams by passing the actor reference over the wire and retrieving the original stream in the parent. r=bent 2012-09-21 13:26:13 -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
Ben Turner
81d9415df5 Bug 781256 - 'Share FileDescriptors across processes in preparation for OS-level sandbox'. r=khuey+cjones.
--HG--
rename : netwerk/base/public/nsIIPCSerializable.idl => netwerk/base/public/nsIIPCSerializableObsolete.idl
extra : transplant_source : %EB%18%9D%E6%B1%C6%26%A2%16%F3%85g%1A%25%B1%8E%A1%E72e
2012-08-16 00:02:32 -04:00
Honza Bambas
5fe7a22e2c Bug 215450: Allow uploading of files greater than 2gb in size. Involves making input streams 64-bit capable. Significant work done by Makoto Kato, finished by Honza Bambas. r=hbambas,bsmedberg,jdrew,sicking 2012-08-10 22:44:11 -04:00
Ben Turner
98a57bfb9c Bug 778968 - 'Avoid stat-ing remote blobs on the main thread'. r=janv.
--HG--
extra : transplant_source : %90%87%047%07BA%97%E0%F1n%1DY%08D%7C%E39%20%0F
2012-08-02 23:25:30 -07:00
Ben Turner
f8dee3f4cb Backed out changeset 46653198caac 2012-08-02 21:53:03 -07:00
Ben Turner
b77c1c5db1 Bug 778968 - 'Avoid stat-ing remote blobs on the main thread'. r=janv. 2012-08-02 13:42:30 -07:00
Ben Turner
1ef4c0de5b Bug 759427 - 'Multiprocess blob support for MessageManager and IndexedDB'. r=smaug+janv+khuey (rs=sicking for nsBlobURI changes).
--HG--
extra : transplant_source : %95%B5y%11%C5%AB%D9%CF%FF%7C%5E%BB%E5%DA%F5j%83o%29%EB
2012-08-01 23:02:29 -07:00