Commit Graph

541 Commits

Author SHA1 Message Date
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
Nathan Froyd
00fc20e1f7 Bug 1207245 - part 2 followup - add more mozilla/RefCounted.h includes where appropriate; r=me 2015-10-12 22:24:05 -04:00
philipp
57aeda29d4 Bug 1205987 - Add freecorder dll to Windows blocklist. r=dmajor
CLOSED TREE
2015-10-13 13:03:12 -07:00
Chris Peterson
dd2fcb9b7d Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Brian Birtles
d5af21047a Bug 1202556 - Detect underflow in TimeStamp addition/subtraction operators; r=froydnj 2015-09-14 09:47:09 +09:00
Michael Layzell
f20336e5e1 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Nicholas Nethercote
dd6b6da237 Bug 1203553 - Fix an MSVC warning in mozglue. r=glandium.
This lets us remove the ALLOW_COMPILER_WARNINGS=True flag.
2015-09-10 16:52:30 -07:00
Brian Birtles
79d3dd88b7 Bug 1203350 - Unify arithmetic operators in TimeStamp; r=froydnj 2015-09-11 15:02:04 +09:00
Ted Mielczarek
326ab27018 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.
2015-09-08 11:35:43 -04:00
Aaron Klotz
8a0c89214f Bug 1194890 - Ensure that any user32 imports to mozglue are delay loaded; r=glandium 2015-08-14 16:27:03 -06:00
Nicholas Nethercote
69d088e45f 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.
2015-08-27 20:44:53 -07:00
Cervantes Yu
aa469abcee Bug 1166207 - Load preload.js in the Nuwa process. r=khuey 2015-08-28 17:57:44 +08:00
Ryan VanderMeulen
8f8d05680f Merge m-c to fx-team. a=merge 2015-08-26 14:34:15 -04:00
Gijs Kruitbosch
638e27517a Bug 1198186 - increase limit used to detect int values passed as first argument to LdrLoadDll, r=dmajor 2015-08-25 12:07:39 +01:00
David Major
187400f43f Bug 1196859 - Block Roboform binaries written against old SDK. r=bsmedberg 2015-08-20 12:27:00 -04:00
Gerald Squelart
f7d85b23f8 Bug 1197145 - Added BaseTimeDuration::IsZero(), BaseTimeDuration::operator bool(), TimeStamp::operator bool(). r=nfroyd 2015-08-21 05:36:00 -04:00
Jim Chen
03727ba844 Bug 1192082 - Iniialize/deinitialize JNI in nsAppShell; r=snorp
First we need to set the Gecko thread JNIEnv* in nsAndroidStartup, but
after that we can initialize and deinitialize the rest of JNI, including
AndroidBridge, in GeckoAppShell. This makes nsAppShell control the
AndroidBridge lifetime. Over time, parts of the AndroidBridge
functionality will be migrated to nsAppShell.
2015-08-13 00:53:40 -04:00
Jim Chen
742bfc8ea0 Bug 1192082 - Get rid of GeckoAppShell.nativeInit; r=snorp
Instead of letting AndroidBridge be constructed separately, we'll let
Gecko construct AndroidBridge.
2015-08-13 00:53:39 -04:00
Mike Hommey
03d9719906 Bug 1168291 - Install mozcrt.lib instead of mozglue.lib in the SDK. r=mshal
When building with MOZ_CRT (which is more or less the default when
building on Windows with MSVC2013), building e.g. XPCOM components
requires linking against mozcrt.lib, so it needs to be shipped in
the SDK. On the other hand, mozglue.lib, which is currently shipped,
is not useful because it lacks the necessary hacks from mozcrt.lib
avoiding crashes for memory allocator mismatch.
2015-08-11 07:20:20 +09:00
Richard Newman
f465cd09ce Bug 1135281 - Correctly bind null parameters in SQLiteBridge.cpp. r=sebastian 2015-08-07 21:43:47 -07:00
Jim Chen
cf40f969b5 Bug 1186467 - Update generated JNI bindings; r=me 2015-08-04 17:47:28 -04:00
Jim Chen
9db302862d Bug 1182641 - Update autogenerated code; r=me 2015-07-29 15:11:15 -04:00
Mark Capella
48fba8ca8a Bug 1174922 - NativeZip does not null-terminate zip entry comparisons correctly, r=nchen 2015-07-29 01:03:26 -04:00
Jacek Caban
b5310ade5f Bug 1176731 - Don't mark static inline functions as MFBT_API in TimeStamp.h. r=Waldo 2015-07-28 17:47:33 +02:00
David Major
7b3f762ca3 Bug 1170141 - Block RealNetworks Browser Record Plugin due to startup crashes. r=ehan 2015-07-22 13:27:00 +02:00
Birunthan Mohanathas
47ed3a3675 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Ehsan Akhgari
22e6fc8e45 Bug 1111415 - Null check the base pointer in FramePointerStackWalk before dereferencing it; r=BenWa 2015-07-10 15:49:54 -04:00
Robert O'Callahan
972aedb76b Bug 1143575. Android's screenshotting code should invalidate the LayerManagerComposite to ensure composition will actually happen. r=nical
There is some ambiguity about whether ScheduleComposite will necessarily
trigger a composite all the way to nsWindow::DrawWindowUnderlay. Android
robocop tests assume it will, because they rely on DrawWindowOverlay
being called so they can take a screenshot and make progress,
but this is a very fragile assumption. They also rely on the entire
window being painted, which is also a fragile assumption.

This patch improves the situation by explicitly invalidating the current
window area when Android Java code needs to trigger a composite. This avoids
regressions from future patches in this series which make composition bail
out when there is nothing invalid.

The resulting setup is still a bit fragile for my taste but I'm not sure
what the ideal solution would be.
2015-06-12 03:20:04 +12:00
Gabriele Svelto
8fed70f18a Bug 858928 - Switch XRE_StartupTimelineRecord() from PRTime to TimeStamp. r=froydnj 2015-07-06 18:01:09 +02:00
Benoit Girard
e61fc6d12d Bug 1179550 - Always terminate the str buffer. r=erahm 2015-07-02 16:30:58 -04:00
Nathan Froyd
8780083336 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
Daniel Holbert
f7a104927a Bug 1176266: In TimeStamp_posix.cpp, check for XP_LINUX instead of LINUX, and add missing #include, to allow strrchr usage. r=BenWa
Landing on a CLOSED TREE with RyanVM's permission.
2015-06-19 10:39:20 -07:00
Benoit Girard
9b4532466d Bug 1172216 - Move nsStackwalk to mozglue. r=glandium 2015-06-10 16:32:45 -04:00
Benoit Girard
aace26e2a9 Bug 858927 - Move the mozilla::TimeStamp into mozglue. r=glandium 2015-06-05 16:03:11 -04:00
Mike Hommey
d594f5f393 Bug 1172668 - Unbreak DMD on OS X after bug 1168719. r=gps
Bug 1168719 added a generic replace malloc library which name happened to be
the same as the existing dummy library used to link replace malloc on OSX.
Change the name of that dummy library.
2015-06-10 10:49:22 +09:00