Commit Graph

564 Commits

Author SHA1 Message Date
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
David Major
477ce1af3e Bug 763395 - Add nlsp.dll to blocklist. r=bsmedberg 2015-06-05 11:49:00 -04:00
Julian Seward
ed082bc0ef Bug 1125091 - Make Nuwa be Valgrind-friendly. r=njn. 2015-06-01 12:18:00 +02:00
Nathan Froyd
bb51644dac 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
ac7e1768b8 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
a186075cb0 Bug 1043692 - Move DIST_INSTALL to moz.build. r=gps 2015-05-12 07:55:22 +09:00
Mike Hommey
23fb4c1447 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
David Major
dc677dff01 Bug 1160148: Also block AVX2 in Win7RTM, and move the code to mozglue. r=froydnj 2015-05-11 16:12:45 -04:00
Jim Chen
ff67df1f51 Bug 1157908 - Optimize pumpMessageLoop call to use less JNI; r=snorp 2015-04-27 20:52:52 -04:00
Ryan VanderMeulen
918a8d6141 Backed out changesets a486dcc9c233 and 7164a2488b28 (bug 1157908) for various Android test failures.
CLOSED TREE
2015-04-24 16:01:17 -04:00
Jim Chen
0b6415ec9d Bug 1157908 - Optimize pumpMessageLoop call to use less JNI; r=snorp 2015-04-24 14:40:55 -04:00
David Major
1ebb4c286e Bug 1130061: Block version 1.5 of vwcsource.ax. r=bsmedberg 2015-04-24 11:29:40 -04:00
travis
da4b77c3f3 Bug 1154803 - Put our sigaction diversion in __sigaction if it exists r=glandium 2015-04-21 09:32:45 -05:00
Randall Barker
47296673b3 Bug 1148149 - Support Android Presentation API. r=snorp, r=jgilbert 2015-04-10 22:14:00 -04:00
David Major
a8c1002b48 Bug 1151506: Block long hex name DLLs due to startup crashes. r=bsmedberg 2015-04-10 15:23:32 -04:00
Mike Hommey
75f4f8947d Bug 1138824 - Remove NO_INSTALL_IMPORT_LIBRARY. r=gps
NO_INSTALL_IMPORT_LIBRARY is only used in one place, and since we don't even
use $(DIST)/lib for gecko, it actually doesn't make a difference presently.
2015-03-27 09:42:00 +09:00
Cervantes Yu
96343f2326 Bug 1144535: Respect caller-specifed thread attributes in creating threads in the Nuwa process. r=asuth 2015-03-20 18:55:11 +08:00
Jim Blandy
3245acc086 Bug 1134039: Make SpiderMonkey standalone (JS_STANDALONE) builds use jemalloc and mozglue by default. r=glandium
JS_STANDALONE builds don't need everything in mozglue; have mozglue omit the
unneeded code for such builds.

Since the SpiderMonkey binaries are now more like the other Gecko binaries, we
can remove some special cases for JS_STANDALONE in GeckoSharedLibrary,
GeckoProgram, etc. All Gecko binaries now use mozglue, which contains mfbt, so
we no longer need mention mfbt explicitly.

Add a property to the getBuildConfiguration testing function's result that
indicates whether we're using jemalloc or not.

Include the newly necessary source directories in the SpiderMonkey source
package.
2015-03-19 02:12:53 -07:00
David Major
5f0a55b479 Bug 1136968 - Add YCWebCameraSource.ax to DLL blocklist. r=benjamin 2015-03-17 18:32:00 +01:00
Cervantes Yu
0316846a2e Bug 1119157: Fix false over-recursion in web worker threads by cleaning up thread info in the processes forked from Nuwa. a=asuth 2015-02-17 16:25:24 +08:00
James Willcox
64e282f344 Bug 1127464 - Assert when we unexpectedly unload libraries on Android r=glandium 2015-03-09 08:33:22 -05:00
Mike Hommey
2a65448fd6 Bug 1139036 - Bind all symbols from libmozglue.dylib when it is loaded. r=ted 2015-03-04 21:15:08 +09:00
David Major
d559c2242b Bug 1132663 - Part 2: Block rndlnpshimswf.dll and rndlmainbrowserrecordplugin.dll. r=bsmedberg 2015-02-18 14:12:41 +13:00
Mike Hommey
fa5908f9b0 Fixup bug 1121269 for b2g bustage on a CLOSED TREE. r=me 2015-02-11 11:30:58 +09:00
Mike Hommey
604d5f8d8c Bug 1129244 - [Nuwa] wrap pthread_mutex_trylock. r=thinker 2015-02-11 10:21:04 +09:00
Mike Hommey
92c6b5db2d Bug 1121269 - Remove TLS keys from bookkeeping in non-Nuwa processes too. r=thinker 2015-02-11 10:21:04 +09:00
Mike Hommey
e556ca8eeb Bug 1121269 - Use a LinkedList to store TLS keys for Nuwa, and allocate the first element in a static buffer. r=thinker 2015-02-11 10:21:03 +09:00
Mike Hommey
fe917e8ec3 Bug 1059797 - Really share the same zlib inflate buffers for SeekableZStream chunks. r=nfroyd 2015-02-11 10:21:02 +09:00
James Willcox
0e11680bbd Bug 1108709 - Don't chdir on Android r=glandium 2015-02-02 17:49:44 -06:00
David Major
768c60dd40 Bug 1123778 - Block Lenovo Onekey Theater DLLs. r=bsmedberg 2015-01-21 18:52:00 -05:00
Mike Hommey
dac0d3a532 Bug 1120272 - Expose _aligned_alloc and _aligned_free from mozglue. r=njn 2015-01-20 13:10:00 +09:00
Masatoshi Kimura
40a556102e Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Jim Chen
67f8ab8931 Bug 1116589 - Use templated JNI classes in generated bindings; r=snorp 2015-01-09 19:33:57 -05:00
James Willcox
1241cd7cc4 bug 1118552 - fix gcc4.9 warnings on Android r=glandium 2015-01-06 22:20:46 -05:00
Botond Ballo
c573bede73 Bug 1073003 - Remove an unused function in Nuwa.cpp. r=glandium
--HG--
extra : rebase_source : 96fa8ccbeab6c2046c9ca522307a82fe93b04327
2014-12-23 03:21:39 -05:00
Botond Ballo
686c0ced04 Bug 1073003 - Fix -Wunused-variable in Nuwa.cpp. r=glandium
--HG--
extra : rebase_source : 6d902895f5e2d08be939213c414e763968d64547
2014-12-23 03:21:24 -05:00
Chris Peterson
77809be56b Bug 1110031 - Part 2: Mark some directories as FAIL_ON_WARNINGS for some compilers. r=gps 2014-12-10 22:46:01 -08:00
Chris Peterson
e56f788c56 Bug 1110031 - Part 1: Mark more directories as FAIL_ON_WARNINGS. r=gps 2014-12-10 22:56:31 -08:00
Kai-Zhen Li
6a07e31ef6 Bug 1103827 - Remove __pthread_cond_timedwait. r=cyu 2014-12-12 16:12:21 +08:00
Kai-Zhen Li
07fe607139 Bug 1104649 - Always cast the string for putenv. r=glandium 2014-11-26 20:26:56 +08:00
Eugen Sawin
1e5b4f46ba Bug 1101583 - Remove unused variables. r=glandium 2014-11-19 17:17:28 +01:00
Mike Hommey
e945567397 Bug 1101070 - Add missing OSX build flag for the new replace-malloc symbol. r=njn,r=khuey
Bug 818922 added a new replace-malloc symbol that the OSX linker tricks need
to know about.
2014-11-19 09:46:47 +09:00
Cervantes Yu
d8b05df057 Bug 1091533, Part 2: Implement NuwaAddThreadConstructor() to allow a thread to perform a custom action after being recreated in the content process. r=khuey,tlee 2014-11-06 19:34:03 +08:00
Cervantes Yu
9b723812ad Bug 1091533, Part 1: Don't wrap tgkill() on the Nuwa process. r=BenWa 2014-11-06 19:10:52 +08:00
Chris Pearce
c8decd7131 Bug 1088488 - Add GMPLoader interface to encapsulate loading GMPs, pass that to XRE_InitChildProcess. r=jesup,r=bsmedberg,r=glandium 2014-11-14 21:26:24 +13:00
Nick Alexander
f57df069d5 Bug 976699 - Place architecture specific assets in assets/$(ANDROID_CPU_ARCH). r=glandium 2014-11-03 20:04:20 -08:00
Mike Hommey
21ec48314e 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
c5ba34275a Bug 1077148 part 1 - Define mozcrt in moz.build. r=gps
--HG--
rename : mozglue/build/Makefile.in => mozglue/crt/Makefile.in
rename : mozglue/build/fixcrt.py => mozglue/crt/fixcrt.py
2014-10-30 13:05:50 +09:00
Mike Hommey
98a1c77f54 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
8e39742226 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
f892df624f Bug 1083686 - Tool to capture and reproduce Firefox's memory allocations. r=njn,r=mshal
--HG--
rename : mozglue/build/Makefile.in => mozglue/build/replace_malloc.mk
2014-10-24 13:08:01 +09:00
Mike Hommey
53075879ab Bug 1082524 - Do not deref null pointers in link_map. r=nfroyd 2014-10-18 09:27:55 +09:00
Mike Hommey
58495f89bc 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
3234728290 bug 1081034 part 4 - Remove wrapping for weak libc symbols. r=nfroyd
This effectively backs out bug 791419, a part of bug 850332, and bug 1001703.
2014-10-16 09:20:16 +09:00
Mike Hommey
e784c87c0d 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
8751066e3e 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
c745a94ef5 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
435321ece7 Bug 1078837 part 2 - Replace IsSystemElf/reinterpret_cast dance with better API. r=nfroyd 2014-10-16 09:19:45 +09:00
Mike Hommey
8de967c33a Bug 1078837 part 1 - Move CustomElf::mappable to BaseElf. r=nfroyd 2014-10-16 09:19:45 +09:00
Mike Hommey
80e38b22b7 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
32cc4d97f4 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
ff95910448 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
bf80a113ab Bug 1077366 - Remove most symbol wrapping from Android builds. r=nfroyd
Since essentially everything is linked to libmozglue and libmozglue takes
precedence in symbol resolution in our dynamic linker, there is no need
to wrap most symbols. PR_GetEnv/PR_SetEnv still needs wrapping because
there's no other way to actually wrap the calls from NSPR itself and NSS,
as well as the symbols wrapped because our dynamic linker can't find them
in system libraries on some devices because they're weak.
2014-10-14 07:17:13 +09:00
Mike Hommey
9e7e4fb6e1 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
e1da4c973b Bug 1077135 - Ensure logging initialization for early log messages in the linker. r=nfroyd 2014-10-04 10:31:49 +09:00
Mike Hommey
e3a6a0b557 Bug 1077135 - Initialize ElfLoader::DebuggerHelper::firstAdded. r=nfroyd 2014-10-04 10:31:38 +09:00
Jim Chen
df3c7f4bd1 Bug 888482 - Send event to set layer client; r=snorp 2014-09-30 18:20:58 -04:00
Ryan VanderMeulen
72911fffa8 Merge m-c to inbound. a=merge
CLOSED TREE
2014-09-24 16:08:33 -04:00
Jim Chen
595110b463 Bug 1066760 - Redirect mozalloc_abort through Java exception handling; r=snorp 2014-09-24 14:12:54 -04:00
Jim Chen
0c9d262657 Bug 1066760 - Add base address and fall back to system dladdr in __wrap_dladdr; r=froydnj 2014-09-24 14:12:54 -04:00
Michael Comella
77eaa1fb0f Bug 915312 - Followup: Replace NULL with nullptr. r=glandium 2014-09-23 13:47:35 -07:00
David Major
24a3af6c93 Bug 1046382 - Blocklist dtwxsvc.dll. r=bsmedberg
--HG--
extra : rebase_source : 007867f3df7090bf67dcadeeac6f4ec422e16ac5
2014-09-18 14:27:11 +12:00
Jim Chen
0bdfa69d46 Bug 1063120 - Add synchronous method to notify Gecko observer; r=snorp 2014-09-11 18:31:32 -04:00
Mike Hommey
92deb5899a Bug 1059113 - Use templates for shared libraries and frameworks. r=gps
Also force to use the existing template for XPCOM components.
2014-09-04 09:04:45 +09:00
Mike Hommey
c2a27deef9 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
8fd95ad480 Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps 2014-09-03 14:10:54 +09:00
Jim Chen
24a29bbf39 Bug 1056941 - Remove extract libs parameter; r=glandium 2014-08-26 15:08:00 -04:00
Bill McCloskey
586f04d680 Bug 1045847 - Initialize sProcessType really, really early (r=khuey) 2014-08-08 17:52:12 -07:00