gecko/dom/indexedDB
Ehsan Akhgari 5ee21d6d3f 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
..
crashtests
ipc Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
test Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
AsyncConnectionHelper.cpp Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
AsyncConnectionHelper.h Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
CheckPermissionsHelper.cpp Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
CheckPermissionsHelper.h Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
Client.cpp Bug 888105 - '.DS_Store files can screw up origin initialization.' r=janv. 2013-06-29 19:25:15 -07:00
Client.h Bug 878703 - Cleanup usage of IO thread only objects. r=bent 2013-06-05 10:11:23 +02:00
DatabaseInfo.cpp
DatabaseInfo.h
FileInfo.cpp Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
FileInfo.h Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
FileManager.cpp Bug 878703 - Cleanup usage of IO thread only objects. r=bent 2013-06-05 10:11:23 +02:00
FileManager.h
IDBCursor.cpp Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
IDBCursor.h Bug 877762 - GC: Post-barrier cycle collector participants - 7 Convert most JSObect to use Heap<T> (ex. XBL) r=bz 2013-06-18 11:00:38 +01:00
IDBDatabase.cpp Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
IDBDatabase.h bug 789919, (snow-white) make addref/release of CCable objects faster by removing indirect refcnt increase/decrease, r=mccr8, test changes r=ehsan 2013-07-09 13:30:58 -04:00
IDBEvents.cpp Bug 890405 - Remove nsIIDBVersionChangeEvent; r=janv 2013-07-11 13:36:42 -04:00
IDBEvents.h Bug 895009. Don't pass in NonNull/OwningNonNull arguments to WebIDL binding consumers. r=peterv 2013-07-22 08:15:43 -04:00
IDBFactory.cpp Bug 895009. Don't pass in NonNull/OwningNonNull arguments to WebIDL binding consumers. r=peterv 2013-07-22 08:15:43 -04:00
IDBFactory.h Bug 895009. Don't pass in NonNull/OwningNonNull arguments to WebIDL binding consumers. r=peterv 2013-07-22 08:15:43 -04:00
IDBFileHandle.cpp Bug 887909 - Convert IDBFileHandle to WebIDL; r=janv 2013-07-01 09:02:37 +02:00
IDBFileHandle.h Bug 887909 - Convert IDBFileHandle to WebIDL; r=janv 2013-07-01 09:02:37 +02:00
IDBIndex.cpp Bug 884384 - Use JS::MutableHandle<JS::Value> instead of jsval* for out parameters r=smaug 2013-06-21 14:12:46 +01:00
IDBIndex.h Bug 884362 - Make IDBRequest::CaptureCaller use the cx stack and decxify a bunch of IDB. r=bent 2013-06-20 11:05:33 -07:00
IDBKeyRange.cpp Bug 899245 - Rename JS_GetGlobalForScopeChain to JS::CurrentGlobalOrNull. r=luke 2013-07-29 16:45:27 -07:00
IDBKeyRange.h Bug 877762 - GC: Post-barrier cycle collector participants - 5 Convert JS::Value to use Heap<T> r=smaug 2013-06-18 11:00:37 +01:00
IDBObjectStore.cpp Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
IDBObjectStore.h Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
IDBRequest.cpp Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
IDBRequest.h Bug 884362 - Make IDBRequest::CaptureCaller use the cx stack and decxify a bunch of IDB. r=bent 2013-06-20 11:05:33 -07:00
IDBTransaction.cpp Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
IDBTransaction.h Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
IDBWrapperCache.cpp
IDBWrapperCache.h Bug 877762 - GC: Post-barrier cycle collector participants - 7 Convert most JSObect to use Heap<T> (ex. XBL) r=bz 2013-06-18 11:00:38 +01:00
IndexedDatabase.h
IndexedDatabaseInlines.h
IndexedDatabaseManager.cpp Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
IndexedDatabaseManager.h Bug 878703 - Cleanup usage of IO thread only objects. r=bent 2013-06-05 10:11:23 +02:00
Key.cpp Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
Key.h Bug 877762 - GC: Post-barrier cycle collector participants - 5 Convert JS::Value to use Heap<T> r=smaug 2013-06-18 11:00:37 +01:00
KeyPath.cpp Bug 897484 - GC: Convert JS_GetProperty APIs to take MutableHandleValue r=terrence r=bholley r=smaug 2013-07-26 10:00:38 +01:00
KeyPath.h Bug 877762 - GC: Post-barrier cycle collector participants - 5 Convert JS::Value to use Heap<T> r=smaug 2013-06-18 11:00:37 +01:00
Makefile.in Bug 883502 - Part 1: Move 'chromium_config.mk' includes after rules.mk. r=gps 2013-07-04 08:28:43 -04:00
moz.build Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
nsIIDBCursor.idl
nsIIDBCursorWithValue.idl
nsIIDBDatabase.idl Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
nsIIDBIndex.idl
nsIIDBKeyRange.idl
nsIIDBObjectStore.idl Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
nsIIDBOpenDBRequest.idl
nsIIDBRequest.idl Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
nsIIndexedDatabaseManager.idl
OpenDatabaseHelper.cpp Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
OpenDatabaseHelper.h Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
ProfilerHelpers.h Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below) 2013-06-28 18:38:30 -07:00
TransactionThreadPool.cpp Bug 888598 - Move IDBTransaction to WebIDL, r=janv 2013-07-29 19:12:21 +02:00
TransactionThreadPool.h Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00