Commit Graph

575 Commits

Author SHA1 Message Date
Nathan Froyd
89f87132dd Bug 1251881 - use UniquePtr instead of ScopedDeletePtr in mozglue/linker/; r=glandium
There are two instances:

- MappableSeekableZStream::Create uses ScopedDeletePtr, which is
  actually a little odd, since MappableSeekableZStream, as a Mappable,
  is refcounted, and it's unusual to use two different kinds of smart
  pointers for a single class.  I think the more natural thing would be
  for MappableSeekableZStream::Create to return an already_AddRefed, but
  that change spirals out of the realm of "simple refactoring" quickly.

- SzipCompress::run uses ScopedDeletePtr along with some dubious use of
  raw pointers.  I changed things out for UniquePtr and also tidied the
  memory management a bit, which I think makes things a little clearer.
2016-02-26 13:50:59 -05:00
Ms2ger
e11f0e8757 Bug 1252112 - Remove obsolete rules to copy prcpucfg.h around; r=ted 2016-03-01 09:17:29 +01:00
Gian-Carlo Pascutto
d9a89388aa Bug 1247741 - Additional checks for pointer validity in LdrLoadDLL detour. r=aklotz 2016-02-18 00:56:00 +01:00
Cervantes Yu
0b0aa6da47 Bug 1248896 - don't conditional compile on config ENABLE_TESTS in Nuwa. r=khuey 2016-02-18 15:33:59 +08:00
Chris Manchester
974220b68a Bug 1216681 - Add a windows version of fileid to extract a guid from windows binaries. r=jimm,ted
This patch introduces a small utility program to extract a guid from a shared library
or executable on windows to identify the correct symbol file to read in fix_stack_using_bpsyms.py.
In order for this to work correctly on windows, the library name provided by
MozDescribeCodeAddress needs to be a full path, so the LoadedImageName field
from the IMAGEHLP_MODULE64 structure is used here instead of the ModuleName
field.

MozReview-Commit-ID: 8zkfLWjKVs2
2015-10-29 13:25:03 -07:00
Phil Ringnalda
31ae68b940 Back out ff446e81eaf5 (bug 1216681) for Linux PGO bustage
CLOSED TREE
2016-02-11 20:27:36 -08:00
Chris Manchester
fb36aa7132 Bug 1216681 - Add a windows version of fileid to extract a guid from windows binaries. r=jimm,ted
This patch introduces a small utility program to extract a guid from a shared library
or executable on windows to identify the correct symbol file to read in fix_stack_using_bpsyms.py.
In order for this to work correctly on windows, the library name provided by
MozDescribeCodeAddress needs to be a full path, so the LoadedImageName field
from the IMAGEHLP_MODULE64 structure is used here instead of the ModuleName
field.
2015-10-29 13:25:03 -07:00
Jim Chen
ebe41f27c9 Bug 1238761 - Switch NativePanZoomController to use native methods; r=rbarker
This patch turns NativePanZoomController's MotionEvent handler into a
native method, and it adds the WrapForJNI annotations to all native
methods so that bindings will be automatically generated for them.
2016-01-15 13:05:44 -05:00
Jed Davis
11c2c37592 Bug 1133073 - Use PR_DuplicateEnvironment to avoid post-fork malloc on all Linux platforms. r=dhylands 2016-01-11 14:17:01 -08:00
Jed Davis
dd3ff20e03 Back out 7f6bb9f7e60d (bug 1133073) for bustage. Sorry about that. 2016-01-11 13:29:53 -08:00
Jed Davis
5b44277caf Bug 1133073 - Use PR_DuplicateEnvironment to avoid post-fork malloc on all Linux platforms. r=dhylands 2016-01-11 12:46:50 -08:00
Nicholas Nethercote
84b71404df Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
Nathan Froyd
b375d5c057 Bug 1237009 - avoid extra AddRef/Release in Android NativeZip JNI code; r=darchons
We don't need to take an extra ref when we're just going to release the
one we already have.  Just return our ref directly.
2016-01-04 20:18:41 -05:00
Mike Hommey
cffe74f2a1 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
cadb69de4b Bug 1232458 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in WindowsDllBlocklist.cpp; r=aklotz 2015-12-24 21:38:44 -05:00
Nathan Froyd
2384c3bdcf Backout 6a9d0f869621 (bug 1232458) for adding inappropriate colors to our CLOSED TREE 2015-12-24 21:45:30 -05:00
Mike Hommey
3dc777c558 Bug 1113930 - Use the actual stack end address on x86 OSX and Android for the stack walker. r=froydnj
Also, in the unlikely case none of the supported methods is available, error
out at compile time, because it's not supposed to happen, apart if something
like what bug 989499 did happens again.
2015-12-25 06:47:05 +09:00
Mike Hommey
cff9297236 Bug 1113930 - Move __libc_stack_end related code block from StackWalk.cpp in a non-OSX section. r=froydnj
Bug 989499 unfortunately moved it to a OSX-only section, which broke using
__libc_stack_end, which is Linux-specific (glibc, really).
2015-12-25 06:45:55 +09:00
Nathan Froyd
898943b89d Bug 1232458 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in WindowsDllBlocklist.cpp; r=aklotz 2015-12-06 07:54:29 -05:00
Jim Chen
5326296b3f Bug 1233812 - Remove obsolete methods in GeckoAppShell; r=snorp
These methods were from the XUL Fennec days and are obsolete.
2015-12-23 22:03:35 -05:00
Jim Chen
b605aa550c Bug 1227706 - Remove unused GLController calls and events; r=snorp
Remove GLController calls and events in GeckoAppShell and GeckoEvent
that were made obsolete by the new native calls.
2015-12-23 22:03:34 -05:00
Aaron Klotz
10379467c2 Bug 1233237: Backout a882a8c92a28 for causing winsock connectivity problems; r=backout 2015-12-23 14:35:42 -07:00
Xidorn Quan
4e6e0ee00d Bug 1233666 - Remove hacks for getting frame pointer for x86/x64 gcc. r=glandium 2015-12-22 20:24:33 +11:00
philipp
3f926b84bf Bug 1233237 - Add Nvidia Network Access Manager .dlls to Windows blocklist. r=aklotz 2015-12-19 09:10:00 +01:00
Carsten "Tomcat" Book
0eca0c54c3 Backed out changeset 8b4bffb2ce7c (bug 1133073) for bustage on Android 2015-12-21 11:07:48 +01:00
Jed Davis
ab50338407 Bug 1133073 - Use PR_DuplicateEnvironment to avoid post-fork malloc on all Linux platforms. r=dhylands
This removes the Android-only in-Gecko version of PR_DuplicateEnvironment from bug 773414.
2015-12-17 10:10:00 +01:00
Nathan Froyd
eef875bd6b Backout 62dab36901e2 and 9b4445c0f202 (bug 1232458) for Windows bustage; r=me 2015-12-18 11:15:10 -05:00
Nathan Froyd
ee894a155b Bug 1232458 - fix Windows build bustage on a CLOSED TREE; r=me 2015-12-18 10:57:17 -05:00
Nathan Froyd
f6312ced04 Bug 1232458 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in WindowsDllBlocklist.cpp; r=aklotz 2015-12-06 07:54:29 -05:00
Kartikaya Gupta
9b77b6b8a3 Bug 1230522 - Make some unimplemented functions not be native. r=rbarker 2015-12-10 17:23:07 -05:00
Reuben Morais
9762b0d504 Bug 1212679 - Handle KitKat default messaging app intents. r=fabrice r=snorp 2015-12-08 14:43:09 -05:00
philipp
7e54372bd4 Bug 1222819 - Add Orbit Downloader .dlls to Windows blocklist. r=aklotz 2015-12-01 12:40:25 -07:00
Aaron Klotz
47dc8c0346 Bug 1222933: Backout previous DLL blocklist change as it had no effect on crash; r=backout 2015-12-01 11:53:14 -07:00
Sebastian Kaspari
18acbcb919 Bug 1197720 - NativeCrypto (SHA-256): Let caller define number of bytes in 'str' to update from. r=snorp
In Java we will call this method with byte array buffers we use to read from a stream. Java does not
guarantee to completely fill the buffer (and can't at the end of a stream). Passing the number of bytes
to read from the array to NativeCrypto avoids copying bytes between arrays of various lengths.
2015-11-30 15:59:56 +01:00
Aaron Klotz
939265df10 Bug 1222933 - Add am32-34121.dll to blocklist; r=bsmedberg 2015-11-10 15:25:06 -07:00
Dylan Roeh
214df76183 Bug 1221040 - Add SHA-256 support to NativeCrypto and relevant tests to robocop. r=snorp 2015-11-18 13:10:51 -06:00
Jacek Caban
c2d7396f8b Bug 989499 - mingw 64-bit fixup: use proper type in pointer cast to avoid losing precision. 2015-11-16 15:56:46 +01:00
Benoit Girard
d70c905083 Bug 989499 - Part 2: Use FramePointerStackwalk on windows. r=rjmuizel 2014-03-28 16:31:15 -04:00
Randall Barker
d4aac2b75e Bug 1223440 - Implement NativePanZoomController::setIsLongpressEnabled so long-press detection can be disabled during testing. r=kats 2015-11-10 12:47:48 -05:00
Nathan Froyd
3592281736 Bug 1222088 - remove unused variable from TimeStamp_windows.cpp; r=glandium
clang-cl warns about this via -Wunused-const-variable, so we might as
well get rid of it.
2015-11-05 12:47:36 -05:00
Mike Hommey
405622a83e Bug 1221453 - Use ObjDirPaths for GENERATED_INCLUDES and merge with LOCAL_INCLUDES. r=gps 2015-11-06 09:59:21 +09:00
Nathan Froyd
0b7a3a127e Bug 1220189 - use UniquePtr<T[]> instead of delete[] calls in mozglue/android/; r=darchons
We can do better than use raw new[]/delete[] calls all over this file:
we can factor out the code for APK library loading into a separate
function, and use UniquePtr there.  This refactoring will also
centralize the code for determining the path to a library within the
APK.
2015-10-30 11:16:24 -04:00
James Willcox
2801d6c924 No bug, add missing include to StackWalk.cpp, DONTBUILD 2015-10-28 14:10:29 -05:00
Andrew McCreight
61f76e4340 Bug 1216354 - Disable LSan leak checking by default in mozglue. r=glandium 2015-10-22 09:33:43 -07:00
Jim Chen
4c5c5c26db Bug 1207642 - Work around Dalvik bug by realigning stack on JNI entry. r=snorp
Use the force_align_arg_pointer attribute to force realigning stack at JNI entry points.
2015-10-21 08:27:00 -04:00
Nathan Froyd
e4e2da55c9 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
2015-10-18 01:24:48 -04:00
Nathan Froyd
5254890206 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
Wes Kocher
90ebf26869 Backed out changeset a67ea3f24678 (bug 1205987) for not working as well as originally thought
CLOSED TREE
2015-10-14 09:51:35 -07:00
Carsten "Tomcat" Book
631d2babdf merge mozilla-inbound to mozilla-central a=merge 2015-10-14 12:46:09 +02:00
Reuben Morais
214bccea25 Bug 1213170 - Always generate JNI stubs for GeckoSmsManager. r=nalexander 2015-10-13 21:51:50 -03:00