Граф коммитов

219 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote ec89bbf7f2 Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
Mike Hommey 20a9c9e220 Bug 1235945 - Fix assertion error in some cases when running szip when debug flags are enabled for host tools. r=froydnj 2016-01-05 20:03:43 +09:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Nathan Froyd d8393ccd5b Bug 1207245 - part 2 followup - add more mozilla/RefCounted.h includes where appropriate; r=me 2015-10-12 22:24:05 -04:00
Ted Mielczarek 6be16c3688 bug 1198226 - Move HOST_{C,CXX}FLAGS to moz.build HOST_{CFLAGS,CXXFLAGS,DEFINES}. r=mshal
As part of this move, HOST_NSPR_MDCPUCFG needed to be changed to get the quoting right.

--HG--
extra : commitid : J26MhSiPq9g
extra : rebase_source : 81c5b98371042803741ddace8d01b0097757dff3
2015-09-08 11:35:43 -04:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Mark Capella 9140fbf240 Bug 1174922 - NativeZip does not null-terminate zip entry comparisons correctly, r=nchen 2015-07-29 01:03:26 -04:00
Nathan Froyd 974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Nathan Froyd db188ea282 Bug 1160485 - remove implicit conversion from RefPtr<T> to TemporaryRef<T>; r=ehsan
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary.  It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
2015-05-01 09:14:16 -04:00
Nathan Froyd 3e13ec018f Bug 1116905 - part 1 - remove dependence on implicit conversion from T* to TemporaryRef<T>, non-gfx changes; r=ehsan 2015-04-30 15:17:08 -04:00
Mike Hommey fe90037862 Bug 1043692 - Add a DIST_INSTALL variable to moz.build, and replace NO_DIST_INSTALL with it. r=gps 2015-05-12 07:55:21 +09:00
travis e56b9791d1 Bug 1154803 - Put our sigaction diversion in __sigaction if it exists r=glandium 2015-04-21 09:32:45 -05:00
James Willcox 47ca1c6198 Bug 1127464 - Assert when we unexpectedly unload libraries on Android r=glandium 2015-03-09 08:33:22 -05:00
Mike Hommey 693a41b39b Bug 1059797 - Really share the same zlib inflate buffers for SeekableZStream chunks. r=nfroyd 2015-02-11 10:21:02 +09:00
Chris Peterson 249ac81315 Bug 1110031 - Part 1: Mark more directories as FAIL_ON_WARNINGS. r=gps 2014-12-10 22:56:31 -08:00
Mike Hommey 47c853314f Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.

Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.

Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
2014-10-30 13:06:12 +09:00
Mike Hommey 7a532e200f Bug 1090668 - Use elf.h instead of linux/elf.h when building with android API version >= 21. r=nfroyd 2014-10-29 13:37:00 +09:00
Mike Hommey 3188e8d7ab Bug 1059797 - Pre-allocate zlib inflate buffers in faulty.lib. r=froydnj
Original patch from James Willcox <snorp@snorp.net>
2014-10-28 16:45:17 +09:00
Mike Hommey c9456870c0 Bug 1082524 - Do not deref null pointers in link_map. r=nfroyd 2014-10-18 09:27:55 +09:00
Mike Hommey 984856dd8c Fixup for bug 1081034 - Add missing #ifdef to avoid build failure on desktop linux. r=me,npotb,DONTBUILD 2014-10-17 14:09:17 +09:00
Mike Hommey eb75074fdb Bug 1081034 part 3 - Resolve libc symbols with our linker. r=nfroyd
This allows to resolve weak symbols from some Android device's libc that
dlsym() won't. This is effectively an alternative fix to bug 791419, without
requiring wrapping symbols.
2014-10-16 09:20:14 +09:00
Mike Hommey 9c53800a82 Bug 1081034 part 2 - Move initialization of self_elf to its own separate class. r=nfroyd
The new class is kind of like SystemElf, but using our linker's own symbol
resolution. This also adds some initialization from ELF program headers that
weren't done previously for self_elf, as well as registration as for CustomElf
instances.
2014-10-16 09:20:06 +09:00
Mike Hommey 85b47df0cb Bug 1081034 part 1 - Move GetSymbolPtr, Contains and FindExidx from CustomElf to BaseElf. r=nfroyd 2014-10-16 09:19:46 +09:00
Mike Hommey 84f2c13cef Bug 1078837 part 2 - Replace IsSystemElf/reinterpret_cast dance with better API. r=nfroyd 2014-10-16 09:19:45 +09:00
Mike Hommey c39fcc8944 Bug 1078837 part 1 - Move CustomElf::mappable to BaseElf. r=nfroyd 2014-10-16 09:19:45 +09:00
Mike Hommey eb89afceec Bug 1083020 - Add a (dummy) stats method to all LibHandles. r=nfroyd
While here, avoid doing anything if debug logging is disabled.
2014-10-16 09:19:40 +09:00
Mike Hommey f431c6c5b5 Bug 1082524 - Initialize link_map. r=nfroyd
When a library fails to load with CustomElf before it's registered, the
unregistration that does happen in CustomElf's destructor uses link_map,
so it needs to be initialized.
2014-10-15 14:46:09 +09:00
Mike Hommey 35f933f139 Bug 1080342 - Change how the symbols the flash plugin uses are hooked on Android. r=snorp
With bug 1077366, the linker makes the library containing it a fake
LD_PRELOAD. As a consequence, instead of, in the linker itself,
explicitely special-casing the symbols that disappeared in Android 4.4
that the flash plugin uses, it is now possible to use normal symbol
resolution to stubs defined separately in libmozglue.
2014-10-14 07:18:01 +09:00
Mike Hommey 464da0f9c2 Bug 1077384 - Make libmozglue a pseudo-LD_PRELOAD on android. r=nfroyd
In order to avoid adding more dlsym overhead than there already is, resolve
symbols directly in the library containing the linker. (GetSymbolPtr is
essentially free ; dlsym makes the system linker compule a ElfHash itself,
and that's quite expensive to do on all symbols)

This also paves the way for direct symbol resolution in all system libraries.
2014-10-07 07:42:18 +09:00
Mike Hommey 2466a02679 Bug 1077135 - Ensure logging initialization for early log messages in the linker. r=nfroyd 2014-10-04 10:31:49 +09:00
Mike Hommey 5331094bbb Bug 1077135 - Initialize ElfLoader::DebuggerHelper::firstAdded. r=nfroyd 2014-10-04 10:31:38 +09:00
Jim Chen ead154121a Bug 1066760 - Redirect mozalloc_abort through Java exception handling; r=snorp 2014-09-24 14:12:54 -04:00
Jim Chen f3c570c80b Bug 1066760 - Add base address and fall back to system dladdr in __wrap_dladdr; r=froydnj 2014-09-24 14:12:54 -04:00
Mike Hommey 0060683747 Bug 1059090 - Don't require SOURCES to be set for CPP_UNIT_TESTS and SIMPLE_PROGRAMS. r=mshal 2014-09-03 14:16:37 +09:00
Mike Hommey ed70c5f377 Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps 2014-09-03 14:10:54 +09:00
Mike Hommey 1cf20f37fd Bug 1036286 - Ensure faulty.lib diverts libc's sigaction instead of a LD_PRELOADed one. r=nfroyd
and force-send calls to sigaction from faulty.lib-loaded libraries to the libc.
2014-08-07 02:51:20 +09:00
Mike Hommey 15851645b4 Bug 1036286 - Delay registration of the faulty.lib signal handler until when it's necessary. r=nfroyd
It's necessary to delay it because for the second part, we need to call dlopen,
and until recently bionic's linker dead-locked when using dlopen from a static
initializer.
2014-08-07 02:51:03 +09:00
Mike Hommey 1e6fb05108 Bug 1045783 - Move HOST_EXTRA_LIBS to moz.build as HOST_OS_LIBS. r=mshal 2014-08-06 07:26:05 +09:00
Mike Hommey d9443ec932 Bug 1045783 - Move most OS_LIBS to moz.build and do some related cleanup. r=mshal 2014-08-06 07:25:33 +09:00
Mike Hommey 8c39460da9 Backout changeset 34235900c3a0 (bug 1036286) because it wasn't the right fix. 2014-08-05 16:07:06 +09:00
Mike Hommey 5f6ba110e6 Bug 1043802 - Remove TOOLS_DIRS and TEST_TOOLS_DIRS. r=gps 2014-07-29 08:55:55 +09:00
Mike Hommey 0b4c32ffd7 Bug 1043351 - Build ShowSSEConfig as a C++ unit test after it was forgotten in bug 894941 and move linker tests to avoid conflicts. r=mshal
--HG--
rename : mozglue/tests/Makefile.in => mozglue/linker/tests/Makefile.in
rename : mozglue/tests/TestZip.cpp => mozglue/linker/tests/TestZip.cpp
rename : mozglue/tests/moz.build => mozglue/linker/tests/moz.build
rename : mozglue/tests/no_central_dir.zip => mozglue/linker/tests/no_central_dir.zip
rename : mozglue/tests/test.zip => mozglue/linker/tests/test.zip
2014-07-25 07:14:21 +09:00
Jeff Walden ec20cc707d Bug 1037100 - Remove all use of ScopedDeleteArray from mozglue/. r=glandium
--HG--
extra : rebase_source : dbc49be874fd57130f33584892589c180c7d1128
2014-07-21 18:14:11 -04:00
Mike Hommey 1e14ec2f14 Bug 1036286 - Make sure libraries loaded by faulty.lib use its own sigaction. r=nfroyd
Android L added a libsigchain library it LD_PRELOADs. That library exposes
a different sigaction than libc's. It's used for ART.

faulty.lib gets its sigaction from libsigchain, but after bug 874708, the
libraries it loads simply use libc's sigaction, assuming it would be the
hooked one. In turn, this means libraries loaded by faulty.lib may
override faulty.lib's handler, which is definitely not the intent.

This essentially restores some of the code that bug 874708 removed.

An alternative fix would be to add support for LD_PRELOAD, but that has more
implications and feels more risky. This could be done, if necessary, as a
followup.
2014-07-24 13:43:56 +09:00
Mike Hommey 8e037642dc Bug 1036894 part 7 - Move HOST_LIBS to moz.build, as HOST_USE_LIBS. r=gps 2014-07-23 13:29:50 +09:00
Nicholas Nethercote 2a0942be41 Bug 1036789 - Convert the third quarter of MFBT to Gecko style. r=Ms2ger.
--HG--
extra : rebase_source : 668cd394806203ddfa34bd4f226335ff26c846b5
2014-07-10 19:10:17 -07:00
Jeff Walden 8c69dfae30 Bug 953296 - Convert trivial ScopedDelete{Ptr,Array} uses to UniquePtr in mozglue/linker/. (More remain, but they're less trivial to change.) r=glandium
--HG--
extra : rebase_source : 7af7ff2daa70ff3aedaac91d3898bcd90a402162
2013-12-30 13:34:54 -06:00
Mike Hommey f358f3711f Bug 1024248 - Properly tag linker error/warnings in logcat. r=nfroyd 2014-06-13 08:45:58 +09:00
Robert O'Callahan 7043c985ba Bug 1006248. Part 1: Add MOZ_EXPORT in various places. r=glandium
--HG--
extra : rebase_source : cfe209a412cae28d405eae413415cebb6959072a
2014-05-06 17:26:46 +12:00
Ehsan Akhgari 7257ee5010 Bug 1004564 - Move AtomicRefCounted to mozilla::external and outlaw it in Gecko code; r=froydnj 2014-05-01 14:33:20 -04:00
Douglas Crosher a33e69853e Bug 944612 - Guard the ElfLoader sigaction wrapper against the SIGSEGV handler not being installed. r=glandium 2014-03-20 12:35:15 +11:00
Ehsan Akhgari 17f4a32d8b Bug 976896 - Port STL_FLAGS to moz.build; r=mshal 2014-03-04 19:39:06 -05:00
Ehsan Akhgari a8a0206da1 Bug 935778 - Part 1: Add RefCountType, a type compatible with nsrefcnt, to MFBT; r=dbaron,froydnj 2014-02-21 14:45:50 -05:00
Ehsan Akhgari 7e41f47adf Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Mike Hommey 81d8ff07e9 Bug 956398 - Only support text relocations for libflashplayer.so. r=nfroyd 2014-01-25 07:59:14 +09:00
Mike Hommey ec7b1e070a Bug 956398 - Support text relocations in the custom linker. r=nfroyd 2014-01-16 09:13:42 +09:00
James Willcox 8cb44b437e Bug 935676 - Stub out missing Flash symbols r=glandium
--HG--
extra : rebase_source : 7e02a6283a6ee53b3749e1816d4005b238085954
2014-01-15 09:16:33 -06:00
Mike Hommey 2d9ef44f86 Bug 959254 - Make MappableSeekableZStream::ensure mprotect error message more useful for debugging failures. r=nfroyd 2014-01-15 16:21:45 +09:00
Mike Hommey 8fd06cf41b Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal 2013-11-27 22:55:07 +09:00
Mike Hommey b32a4ed166 Backout changeset 3fd4b546eed4 (bug 874266) and changeset a35d2e3a872f (bug 942043) for ASAN build bustage and Windows test bustage
--HG--
extra : amend_source : f20d09aeff1c8b5cbd0f1d24c7ce04e86f3aed1d
2013-11-28 14:24:05 +09:00
Mike Hommey 682364d535 Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal 2013-11-28 13:08:16 +09:00
Mike Hommey e80e877ab7 Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
Mike Hommey dda5b915fe Bug 939039 - Remove now useless FORCE_STATIC_LIB definitions. r=gps 2013-11-19 11:47:28 +09:00
Mike Hommey ffe0380912 Bug 935881 - Use FINAL_LIBRARY for all (fake) libraries that end up linked in a single other library. r=gps 2013-11-19 11:47:14 +09:00
Birunthan Mohanathas c01f63b478 Bug 784739 - Switch from NULL to nullptr in mozglue/linker/; r=ehsan 2013-11-11 14:15:46 -05:00
Mike Hommey 00a70f6f7d Bug 933120 - Move HOST_PROGRAM and HOST_SIMPLE_PROGRAMS to moz.build. r=gps 2013-11-02 08:44:11 +09:00
Jim Chen 9705613071 Bug 930627 - Implement __gnu_Unwind_Find_exidx in custom linker on ARM. r=glandium 2013-10-31 11:40:32 -04:00
Cykesiopka d2f6b7333c Bug 914270 - Part 1: Simple/Automated moves. r=joey 2013-10-24 18:51:00 +01:00
Mike Hommey b000a846c2 Bug 929905 - Consolidate sources in moz.build. r=gps 2013-10-25 08:23:05 +09:00
Nathan Froyd d0c177ce05 Bug 927428 - use __LP64__ instead of HAVE_64BIT_OS in the linker; r=glandium 2013-10-16 11:14:19 -04:00
Mike Hommey f6addb05b1 Bug 886736 - Disable on-demand decompression when latency to get into segfault handlers is too high. r=nfroyd 2013-10-01 15:30:45 +09:00
Nathan Froyd 0dd69ef1ca Bug 920558 - map anonymous pages differently on ARM and x86; r=glandium 2013-09-26 11:17:05 -04:00
Nathan Froyd eb112dbe95 Bug 916923 - work around crash reporter issues with adjacent memory mappings on x86 android; r=glandium,f=gbrown 2013-09-23 15:02:28 -04:00
Joey Armstrong d1be2c217c bug 888009: move HOST_CPPSRCS to mozbuild (batch #2) r=mshal 2013-09-12 13:32:27 -04:00
Mike Hommey 0f2f8bef4c Bug 914374 - Fix buffer overflow in BCJ_X86_filter when the given buffer is too small. r=nfroyd 2013-09-11 08:15:39 +09:00
Seth Fowler f9cdc752b1 Bug 912299 - Make RefCounted's refcount field mutable. r=waldo 2013-09-06 13:32:55 -07:00
Mike Hommey f8bc7fa754 Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Mike Hommey eb14682f30 Bug 907957 - Detect if a segfault signal handler is useless. If it is, disable on-demand decompression. r=nfroyd 2013-08-30 11:14:17 +09:00
Jim Chen 6a7879204c Bug 904646 - Skip NULLs when traversing envp/auxv pointers to let GDB work on Android 4.3; r=glandium 2013-08-14 12:54:33 -04:00
Ehsan Akhgari 2824b29025 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
Mike Hommey 92fbf52fbf Bug 897723 - Allow faulty.lib's on-demand decompression to be reentrant. r=nfroyd 2013-07-26 12:57:53 +09:00
Mike Hommey 078b980b8d Bug 894829 - Avoid symbol resolution for relocations for the same symbol in faulty.lib. r=nfroyd 2013-07-23 07:26:08 +09:00
Mike Hommey abaa52c443 Bug 882608 - Fix various issues in faulty.lib with incomplete pages and MOZ_LINKER_ONDEMAND=0. r=nfroyd 2013-07-23 07:26:07 +09:00
Mike Hommey fd44bdf519 Bug 891266 - Allow to enable faulty.lib debug log at runtime. r=nfroyd 2013-07-10 14:12:35 +09:00
Justin Lebar 051c5b560a 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
Mike Hommey 071998d656 Bug 886730 - Move a szip.cpp MOZ_ASSERT to a safer place. r=nfroyd 2013-06-27 09:35:49 +09:00
Mike Hommey fc82c0f523 Bug 886730 - Add and use a MemoryRange class and helper functions for page alignment in faulty.lib. r=nfroyd 2013-06-27 09:35:49 +09:00
Mike Hommey b340449c73 Bug 886726 - Fix warnings in szip.cpp. r=nfroyd 2013-06-27 09:35:49 +09:00
Mike Hommey c7c836946d Bug 886722 - Rename log/debug to LOG/DEBUG_LOG in faulty.lib. r=nfroyd 2013-06-27 09:35:49 +09:00
Mike Hommey 6d626eb6a0 Bug 885336 - Fix various issues with the dl_mmap interface. r=nfroyd 2013-06-27 09:35:48 +09:00
Brian O'Keefe 11bcc1cd9e Bug 875934 - Move LIBRARY_NAME to moz.build (batch #1); r=mshal
--HG--
extra : rebase_source : 385d3fd65475ffc18ee44ae088753649470e214b
2013-06-17 15:21:01 -04:00
Julian Seward bdb61b948e Bug 882903 - SPS breadkpad unwinder segfaults with on-demand decompression on. r=glandium. 2013-06-14 14:03:25 +02:00
Mike Hommey 7a3c231b71 Bug 874708 - Hook libc's sigaction to avoid system libraries replacing our segfault handler temporarily and restoring it wrongly. r=nfroyd 2013-06-09 09:23:03 +02:00
Mike Hommey 48e758d56b Bug 875824 - Allow to disable on-demand decompression at runtime. r=sewardj 2013-05-29 16:18:27 +02:00
Mike Shal 5169c0a913 Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey CLOSED TREE
From 9e0ba7f425143f545eb6c4b26a9a96b5ade4d8e9 Mon Sep 17 00:00:00 2001
2013-04-23 17:54:15 -04:00
Mike Hommey 5215bd9e2d Bug 865583 - Use thread-safe ref-counting in the linker. r=nfroyd 2013-05-18 09:53:18 +02:00
Mike Hommey 32f20f1c9f Bug 864035 - Add an atomic RefCounted and WeakPtr implementation. r=Waldo 2013-05-18 09:52:53 +02:00
Mike Hommey 5d442bca12 Bug 861796 - Fix crash in LibHandle::~LibHandle. r=nfroyd 2013-04-15 18:36:13 +02:00
Mike Hommey 1cb6364a2e Bug 802240 - Expose an API to mmap the underlying file for a library loaded by faulty.lib. r=nfroyd 2013-04-12 10:23:12 +02:00