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

3704 Коммитов

Автор SHA1 Сообщение Дата
Tom Ritter 6fd392825a Bug 1394013 Fix forbidden string constant assignment r=froydnj
ISO C++ forbids converting a string constant to 'wchar_t*' [-Werror=write-strings]

Either change it to a nullptr (which has same intent) or pass through a static


MozReview-Commit-ID: CSunOCyO9PN

--HG--
extra : rebase_source : bfdabc1f463eca75987c6561f7c3ea60acf0340f
2017-08-22 16:58:06 -05:00
Sebastian Hengst 8eb249afcc merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JSRVc5yW6Kx
2017-09-07 12:39:12 +02:00
Bobby Holley 52ba410a6e Bug 1397052 - Don't update |result| after the acquire fence in nsThreadSafeRefCnt::operator--. r=froydnj
MozReview-Commit-ID: 1Yp4kFXA5gV
2017-09-06 21:55:12 -07:00
Wes Kocher bdcf67c5c3 Backed out changeset 80e9cd4126b4 (bug 1397052) for adding a hazard to the build a=backout
MozReview-Commit-ID: I5ZLNHEfj1j

--HG--
extra : rebase_source : 2fca456cfec65b668247cd6236ff1d146857f7c7
2017-09-06 13:54:07 -07:00
Bobby Holley 9e2964bc63 Bug 1397052 - Don't update |result| after the acquire fence in nsThreadSafeRefCnt::operator--. r=froydnj
MozReview-Commit-ID: 1Yp4kFXA5gV
2017-09-06 11:42:08 -07:00
Kris Maglione c86bc6b1ea Bug 1396676: Return already_AddRefed from cookie service GetSingleton() methods. r=jdm
These methods return an addrefed raw pointer, which makes them easy to use in
ways that cause leaks. If they're to continue returning an addrefed pointer,
they should explicitly return an already_AddRefed.

This also switches to StaticRefPtr with ClearOnShutdown for the cached
pointers for the sake of sanity.

MozReview-Commit-ID: D0lDpU8Hqug

--HG--
extra : rebase_source : 7b199070805fc0472eaf8409932517700ed23d49
2017-09-04 15:05:10 -07:00
Sebastian Hengst b278f15c7f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-06 00:00:04 +02:00
Sebastian Hengst 01c1a3c741 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 17ViEoPyjPa
2017-09-05 23:55:39 +02:00
Eugen Sawin 6cb533c8c1 Bug 1396065 - [1.3] Add nsILoadURIDelegate to handle load delegation to the window (GeckoView). r=smaug,snorp 2017-09-05 19:08:04 +02:00
Nathan Froyd af69df0b21 Bug 1393885 - provide a faster path for do_GetWeakReference; r=erahm
NS_GetWeakReference, called from do_GetWeakReference, QI's its argument
to nsISupportsWeakReference to determine whether a weak reference can be
obtained.  If NS_GetWeakReference is already receiving a
nsISupportsWeakReference pointer, or something than can be converted to
one, then we can skip the QI for a small performance win.
2017-09-05 15:39:40 -04:00
Andrew McCreight e81ef49017 Bug 1390660, part 3 - Make QIing to a few CCed classes faster. r=peterv
QIing to CC interfaces shows up in Speedometer profiles for a few
classes. Presumably there are many of these objects being created and
destroyed. By making these classes check first for the CC interfaces
directly, rather than going up the inheritance chain, this overhead
should be reduced.

MozReview-Commit-ID: I3sf3my8oua

--HG--
extra : rebase_source : f08884a944d5b4ed1eb1da1070de64f21fc9868a
2017-08-16 14:31:40 -07:00
Andrew McCreight 64b725c5cd Bug 1390660, part 2 - Define and use a new macro for CC isupports. r=peterv
The main purpose of defining this is to make conversion of places that
use the non-CC variant easier. There are many more places that could
be converted to use these new macros, if somebody felt motivated.

MozReview-Commit-ID: HspjcN76fjg

--HG--
extra : rebase_source : bf3baa586f90f0afbe9229c32d38cb34cc909b9b
2017-08-16 13:14:11 -07:00
Sebastian Hengst 4d0bad92dd merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Gsw48p934sI
2017-09-02 10:54:44 +02:00
Wes Kocher 8b84853ed6 Merge m-c to autoland, a=merge
MozReview-Commit-ID: GcHZLNPPNnI
2017-09-01 16:34:14 -07:00
Nicholas Nethercote 78adeaf317 Bug 1393384 (attempt 2) - Take advantage of new support for measuring heap blocks via interior pointers. r=erahm.
We now have jemalloc_ptr_info() and moz_malloc_enclosing_size_of(), which can
be used to measure heap blocks via interior pointers. This patch does the
following.

- Adds MOZ_DEFINE_MALLOC_ENCLOSING_SIZE_OF, for defining
  measure-via-interior-pointer functions.

- Uses these functions to replace some horrid pointer arithmetic in functions
  measuring Rust types.

--HG--
extra : rebase_source : 5128408256c128222025153ae3e0f924b2499a2a
2017-09-01 17:25:52 +10:00
Kris Maglione 6bad4f8ef7 Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx

--HG--
extra : rebase_source : a5988ff770888f901dd0798e7717bcf6254460cd
2017-08-29 21:28:31 -07:00
Kris Maglione c9899cb3fa Bug 1366511: Part 2 - Allow autoconverting Err(nsresult) to nsresult. r=ehsan,nbp
This allows MOZ_TRY and MOZ_TRY_VAR to be transparently used in XPCOM methods
when compatible Result types are used.

Also removes a compatibility macro in SimpleChannel.cpp, and an identical
specialization in AddonManagerStartup, which are no longer necessary after
this change.

MozReview-Commit-ID: 94iNrPDJEnN

--HG--
extra : rebase_source : 24ad4a54cbd170eb04ded21794530e56b1dfbd82
2017-08-29 21:28:22 -07:00
Kris Maglione 92dcd409a3 Bug 1366511: Part 1 - Allow packing Result<T, nsresult> values into a single word. r=ehsan,nbp
When used as an error value, nsresult should never be NS_OK, which means that
we should be able to safely pack simple nsresult Result values into a single
word.

MozReview-Commit-ID: GJvnyTPjynk

--HG--
extra : rebase_source : ab5a64b545dfbfe9bbef167f8b63ecbf00b16e07
2017-08-31 16:01:43 -07:00
Sebastian Hengst 603dd8be37 Backed out changeset 5b30f38210e1 (bug 1393384) 2017-08-31 13:51:37 +02:00
Nicholas Nethercote 509fa0867c Bug 1393384 - Take advantage of new support for measuring heap blocks via interior pointers. r=erahm.
We now have jemalloc_ptr_info() and moz_malloc_enclosing_size_of(), which can
be used to measure heap blocks via interior pointers. This patch does the
following.

- Adds MOZ_DEFINE_MALLOC_ENCLOSING_SIZE_OF, for defining
  measure-via-interior-pointer functions.

- Uses these functions to replace some horrid pointer arithmetic in functions
  measuring Rust types.

--HG--
extra : rebase_source : 81940a72a4b6355b1e99cede4db40db68d4afad3
2017-08-24 19:40:32 +10:00
Eric Rahm 197f29015a Bug 1376038 - Part 1: Use a cached ghost window value for the distinguished amount. r=mccr8
We already periodically calculate the ghost window amount after cycle
collection, this just uses a cached value of that for the distinguished amount.
This avoids the overhead of a recalculating the value when reporting telemetry.

--HG--
extra : histedit_source : 4ba3ee62fd2871a87970faca8a70b2284e83981d%2C9246ac39cea50c3bb0d1693d8e831c3b3ad33ad9
2017-07-11 13:58:20 -07:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Henri Sivonen 3c8567b60d Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin
MozReview-Commit-ID: Llt29dvB4Io

--HG--
extra : rebase_source : 3ae51dc8beff3fb19e9318a6c7c30c9ab08a5b57
2017-08-29 16:01:42 +03:00
Kris Maglione 45ed679d5f Bug 1363482: Part 4 - Preload INI files off-thread during startup. r=erahm
MozReview-Commit-ID: CgQLEvjUDOJ

--HG--
extra : rebase_source : 5b10080bafa488082ae4e9537b34253abf979f98
2017-08-31 17:02:10 -07:00
Eric Rahm ffd7c92664 Bug 1393058 - Disable nsMemoryInfo dumper RT signal handling on Android. r=mccr8
It appears some Android devices like to send spurious RT signals to our process
which we interpret to mean a gc/cc log is being requested. This causes large
files to pile up in the device storage. We can just disable this feature for
Android as it would be pretty hard for a user to actually use (they can just
go to about:memory). Automation can still enable the FIFO queue if we ever
want to start dumping memory reports on device again.

--HG--
extra : rebase_source : 80cb04473677db7f3edc9377b2fca4c72eb63b71
2017-09-01 15:27:44 -07:00
Nathan Froyd bd0f2fccab Bug 1393592 - manually de-virtualize nsIWeakReference::QueryReferent; r=ehsan
The virtual call to this method shows up in profiles, and therefore
would be nice to avoid if possible.  We can do that by making
nsIWeakReference hold the weak reference itself and therefore
implementing a non-virtual QueryReferent method.
2017-08-25 13:48:29 -04:00
Nathan Froyd c5fa35746e Bug 1390568 - manually de-virtualize do_QueryReferent; r=ehsan
nsQueryReferent is defined as an nsCOMPtr_helper, which implies that
calling its operator() method requires a virtual call.  While
nsQueryReferent is marked `final`, compiler inlining decisions make it
impossible to de-virtualize the call to operator().  However, we have
many other classes returned by do_* functions that nsCOMPtr handles
directly, requiring no extra virtual calls, and we can give
nsQueryReferent the same treatment.
2017-08-24 20:04:31 -04:00
Tristan Bourvon ba0998ae31 Bug 1380423 - Add static-analysis to enforce strict rules on functions which can run scripts. r=mystor
MozReview-Commit-ID: GGSyq0z5msB
2017-08-08 19:48:53 +03:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Wes Kocher 655a23a70a Merge m-c to autoland, a=merge
MozReview-Commit-ID: CxIXNml1xZW
2017-08-22 17:24:16 -07:00
Andrew McCreight d3b91aeeda Bug 1390692 - Remove the unnecessary second QI entry for nsCycleCollectionISupports. r=peterv
MozReview-Commit-ID: 4o2QZhdomg2

--HG--
extra : rebase_source : a18e94cf45003fa25455d1d69c04e8ccc3e0fd74
2017-08-22 12:51:10 -07:00
Olli Pettay 6e1dc494d2 Bug 1391423, add a nursery for purple buffer to allow faster addref/release on the main thread, r=mccr8
--HG--
extra : rebase_source : 4dcb8af2d3f2518ab0fd00b65fbf1d0096d8e810
2017-08-22 00:01:47 +03:00
Bevis Tseng eb2adceca7 Bug 1373046 - Use idle dispatch for IncrementalFinalizeRunnable. r=billm
MozReview-Commit-ID: 2xVjTSHTcFb
2017-08-15 17:30:24 +08:00
Nathan Froyd 3f20e1f6cd Bug 1386918 - out-of-line LazyLogModule::operator LogModule*(); r=erahm
This function takes up quite a bit of space, and there's no need to for
the log getter to be inlined everywhere.  Moving this to out-of-line
code saves ~200K on x86-64 Linux.
2017-08-18 12:32:05 -04:00
Ehsan Akhgari e743dbc92a Bug 1391306 - Reduce the hashtable lookups in CycleCollectedJSRuntime::Add/RemoveJSHolder by one each; r=mccr8 2017-08-17 18:25:36 -04:00
Nathan Froyd 3ce3d56401 Bug 1391314 - reduce logging codesize by commoning LogModule conversions; r=erahm
The current definition of MOZ_LOG requires calling
LazyLogModule::operator() multiple times, which is unnecessary.  We can
avoid that with a bit of clever macro definition and a lengthy
explanation.
2017-08-17 17:18:12 -04:00
Sebastian Hengst 9d5f4bffd9 Backed out changeset 9c364b2c35d3 (bug 1391306) for failing selftest.py during build. r=backout 2017-08-17 20:27:37 +02:00
Ehsan Akhgari cfd7f1c957 Bug 1391306 - Reduce the hashtable lookups in CycleCollectedJSRuntime::Add/RemoveJSHolder by one each; r=mccr8 2017-08-17 13:46:06 -04:00
Luke Wagner 9b038447f4 Bug 1347644 - Simplify/rename JS::AsyncTask (r=till,bkelly,mccr8)
MozReview-Commit-ID: BahNzYPv0AO
2017-08-16 14:38:53 -05:00
Wes Kocher 7a772df5bf Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYZASFIrXxp
2017-08-14 17:58:17 -07:00
Masatoshi Kimura e698863015 Bug 1389702 - Remove MOZ_DEPRECATED. r=froydnj
MozReview-Commit-ID: 4pOKIFXc4wa

--HG--
extra : rebase_source : 57d503f2253d87fbd422e28c34f49e48115be478
2017-08-13 21:00:10 +09:00
Ehsan Akhgari 047b7f969e Bug 1384821 - Optimize inherited cycle-collectible QueryInterface() implementations for nsCycleCollectionISupports; r=peterv 2017-08-14 12:42:01 -04:00
Ryan VanderMeulen cc7a4548cc Backed out 3 changesets (bug 1376038) to see if it affects the ghost window numbers in bug 1388111.
Backed out changeset b89df6ea668a (bug 1376038)
Backed out changeset ae6472c17577 (bug 1376038)
Backed out changeset 8c99b4e8e6c1 (bug 1376038)
2017-08-07 21:11:42 -04:00
Henry Chang af3b11c151 Bug 1375277 - New safebrowsing threat type "POTENTIALLY_HARMFUL_APPLICATION" introduced by v4. r=francois
As our threattype-listname conversion design, "goog-harmful-proto" is allocated
for this new threat type. This threat type is mainly for mobile.

MozReview-Commit-ID: G9GbgmHHHfp

--HG--
extra : rebase_source : 0681fcd9322b94451a86eafe57bf1ccc4b89db30
extra : intermediate-source : 28b0502d9add81beeae58a2c33f9fd5839d4d544
extra : source : 646f02f15131aa98ad37015b0a641304a3271796
2017-07-27 15:37:57 +08:00
Masatoshi Kimura 49e04cc095 Bug 1149830 - Remove nsIStackFrame::language. r=bz,mccr8
MozReview-Commit-ID: LxTiLFzNJ9Y

--HG--
extra : rebase_source : 98ca14aa59a62309dcbe0c9ed3e961c730ff9db9
2017-08-03 15:50:07 +09:00
Nicholas Nethercote 08e54b7c13 Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium.
MozStackWalk() is different on Windows to the other platforms. It has two extra
arguments, which can be used to walk the stack of a different thread.

This patch makes those differences clearer. Instead of having a single function
and forbidding those two arguments on non-Windows, it removes those arguments
from MozStackWalk, and splits off MozStackWalkThread() which retains them. This
also allows those arguments to have more appropriate types (HANDLE instead of
uintptr_t; CONTEXT* instead of than void*) and names (aContext instead of
aPlatformData).

The patch also removes unnecessary reinterpret_casts for the aClosure argument
at a couple of MozStackWalk() callsites.

--HG--
extra : rebase_source : 111ab7d6426d7be921facc2264f6db86c501d127
2017-07-27 12:46:47 +10:00
Olli Pettay aeabc0c261 Bug 1392564 - Use nursery purple buffer for nsRange and RangeItem, r=mccr8
--HG--
extra : rebase_source : 650d101bb0cec4ed21b35945ae1185aca577b120
2017-08-22 17:47:00 +03:00
Yoshi Huang d8fec521e0 Bug 1371545 - Remove NS_ERROR_IMAGE_SRC_CHANGED and NS_ERROR_IMAGE_BLOCKED. r=smaug 2017-08-22 19:02:09 +08:00
Andrew McCreight 5eecb0df0a Bug 1385474 - Avoid QIing for NoteXPCOMRoot. r=smaug
This callback is only used in very limited ways, so just require that
the caller pass in the canonical supports pointer, plus the
participant. This probably won't affect performance much.

MozReview-Commit-ID: CsThzFsKyYx

--HG--
extra : rebase_source : 9595b1d75fc45bc5ee6d932a840e98b5d760cb78
2017-07-28 16:11:03 -07:00
Wes Kocher 179a07b6ba Merge inbound to central, a=merge
MozReview-Commit-ID: Dg4fbH8wbXt
2017-07-31 17:43:38 -07:00