Commit Graph

16773 Commits

Author SHA1 Message Date
Andrea Marchesini
2e5b11551a Bug 1396290 - nsStringStream should propagate the OOM error of SetData() when cloned, r=froydnj 2017-09-06 18:11:44 +02: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
Nicholas Nethercote
d5f5450783 Bug 1392884 - Remove nsIAtomService. r=froydnj.
It's no longer used, and we're in the process of making nsIAtom not usable from
scripts, so we don't want it to be used.
2017-08-25 17:06:58 +10:00
Henri Sivonen
d2b0cdbc9c Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca

--HG--
extra : rebase_source : 78dc1b549c97e5e4fb0dc625acdab23806b3e941
2017-09-01 11:53:31 +03:00
Henri Sivonen
3e8b6b5f47 Bug 1395527 part 1 - Add microbenchmarks for IsASCII and IsUTF8. r=froydnj
MozReview-Commit-ID: 3oploVISQ3F

--HG--
extra : rebase_source : 08d184e9b09a6375f6c6ace2b3511d39e9b36691
2017-08-31 14:46:25 +03: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
Wes Kocher
5f157c17dc Merge inbound to central, a=merge
MozReview-Commit-ID: 3JxUEFuinHY
2017-09-01 16:29:10 -07:00
Julian Descottes
10fc14905c Bug 1395990 - remove Services.appinfo.isOfficial;r=mossop
MozReview-Commit-ID: 1hohMqK7K90

--HG--
extra : rebase_source : 5503da20cf80e8c16960bd93d916128e8e1e5d2b
2017-09-01 18:57:43 +02:00
Andrea Marchesini
74a5faef65 Bug 1395140 - Implement "http-on-stop-request" notification, r=mayhemer 2017-09-01 11:55:37 +02:00
Sebastian Hengst
eee61902f8 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-01 10:45:14 +02:00
Sebastian Hengst
43bc951ac7 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ES9rKhiQo10
2017-09-01 10:38:51 +02: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
Joel Maher
d5fab2cf6d Bug 1394989 - Disable xpcom/tests/unit/test_nsIProcess_stress.js for coverage builds. r=froydnj 2017-08-31 15:38:49 -04: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
qiaopengcheng-hf@loongson.cn
b051bf36d9 Bug 1394286 - mips64: fix error correction about stackpointer within function _NS_InvokeByIndex. r=froydnj
--HG--
extra : rebase_source : 716b6ff862d57e13b2169ba7fcc1f6e6ef2d636e
2017-08-30 10:01:26 +08:00
Sebastian Hengst
a56d428b1f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Gf0QPFp52Bj
2017-08-30 11:05:16 +02: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
Andrew McCreight
f3d6766f0e Bug 1394176 - Use default values for scheduler prefs if the parent process didn't send any. r=billm
In some unknown circumstance, possibly if the parent process has a
different version than the child process, the child does not receive
scheduler prefs, which makes it read out of an uninitialized local
variable. This can probably happen because the scheduler prefs are
checked before we do the ContentChild::Init version check. Bill also
suggested that the pref env var might be getting truncated.

This patch improves on the situation by using null for the prefs array
if none was sent, and falling back on the default values, which leave
the scheduler disabled.

This also checks that the pref string is at least long enough to avoid
a buffer overflow. Note that if the end of the string isn't an integer
we'll end up with an sPrefThreadCount of zero, which can't be good.

MozReview-Commit-ID: ByHLFMEpgyZ

--HG--
extra : rebase_source : 8f6368b88ec3746f4d1c7716a962bb2ac3c2f3b5
2017-08-29 10:30:03 -07:00
Sean V Kelley
b24a6c913e Bug 1376858 - Use SystemGroup to label nsIThread::AsyncShutdown, r=billm
MozReview-Commit-ID: IDPE6zhEnVI

--HG--
extra : rebase_source : c6c47ba59dc983ba0747f4a222a88e9fbac3efb2
2017-08-27 18:58:54 -07:00
Wes Kocher
a8e6d0bd2c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 7XpmaFg1k8N
2017-08-29 16:17:13 -07:00
David Major
100151c7a9 Bug 1392485: Add REX.R mov to the disassembler. r=handyman
To mitigate risk for beta uplift, the logic here is limited to what we need for QueryDosDeviceW on Win7x64. A better long-term fix would be to combine this with the more general mov logic in the REX.W section.

MozReview-Commit-ID: BykQSYY61Ua

--HG--
extra : rebase_source : 84ad8ff28865cb04e21d6234a09b06202ca4d363
2017-08-30 07:16:44 +12: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
Andrew McCreight
c06c75d418 Bug 1394655 - Don't call SetNextIdleDeadlineRef on beta or release. r=froydnj
MozReview-Commit-ID: sIO4thBdpq

--HG--
extra : rebase_source : a66b6372ab2effeb6ecc53b6eb170c117a9ba1df
2017-08-28 20:53:05 -07:00
Kris Maglione
5e2a16d2d8 Bug 1363482: Part 5 - Preload component manifests off-thread during startup. r=erahm
MozReview-Commit-ID: 2BTkf2C5tMI

--HG--
extra : rebase_source : 671deea52e77af391dab7315a72e02c793cc2b03
2017-05-12 17:55:47 -07: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
Kris Maglione
c4a2fd3bfb Bug 1363482: Part 2 - Allow pre-loading file and JAR entry contents off-thread during startup. r=erahm
MozReview-Commit-ID: 8bKzYpXBQvT

--HG--
extra : rebase_source : 6750d471a0a39338b5145e2dab9d953b4c30a63f
2017-08-30 15:47:17 -07:00
Kris Maglione
42402b8f46 Bug 1363482: Part 1 - Fix FileLocation(nsIZipArchive*) and add a GetBaseZip() getter. r=erahm
The FileLocation(nsIZipArchive*) constructor is declared, but not actually
implemented, so attempting to use it causes a linking error.

Additionally, when a FileLocation is created from an existing zip archive
(such as one from the zip cache or the Omnijar service), it's helpful to have
direct access to that archive rather than having to open a new copy, or infer
it from the path.

MozReview-Commit-ID: 2U14gAm0FYL

--HG--
extra : rebase_source : 97a420f5cc1a97a24debee3764989916be79bcaf
2017-05-10 17:10:58 -07:00
Wes Kocher
4cf89b3423 Merge m-c to inbound, a=merge
MozReview-Commit-ID: FusyUW1CQ4s
2017-09-01 16:33:28 -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
Chung-Sheng Fu
6a8ee766d6 Bug 863246 - Content can only load resource:// URIs declared content-accessible in manifests r=billm,bz
bz:
    caps/nsScriptSecurityManager.cpp

billm:
    browser/extensions/activity-stream/jar.mn
    browser/extensions/onboarding/jar.mn
    chrome/RegistryMessageUtils.h
    chrome/nsChromeRegistry.h
    chrome/nsChromeRegistryChrome.cpp
    chrome/nsChromeRegistryContent.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.h
    netwerk/protocol/res/nsIResProtocolHandler.idl
    netwerk/protocol/res/nsISubstitutingProtocolHandler.idl
    netwerk/protocol/res/nsResProtocolHandler.cpp
    netwerk/protocol/res/nsResProtocolHandler.h
    xpcom/components/ManifestParser.cpp

MozReview-Commit-ID: 1RXeNn7jdBf

--HG--
extra : rebase_source : 83000448abf58b7956c2eb122604d7ab38ad0f7c
2017-06-08 17:44:09 +08: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
Bill McCloskey
f90a87caa9 Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj)
MozReview-Commit-ID: JWBxz3bwgwD
2017-08-25 10:28:23 -07:00
Bill McCloskey
2270017046 Bug 1350432 - Add MutexAutoLock::AssertOwns (r=froydnj)
MozReview-Commit-ID: KQGaHRFDxo4
2017-08-25 10:28:23 -07:00
Bill McCloskey
9cd553af84 Bug 1350432 - Remove mEventObservers to SynchronizedEventQueue (r=froydnj)
MozReview-Commit-ID: 8Xt1gdxFDr4
2017-08-25 10:28:23 -07:00
Bill McCloskey
8d0e884b2f Bug 1391850 - Allow IdleDispatch from any thread (r=smaug)
MozReview-Commit-ID: FWb48VV0do8
2017-08-25 10:28:23 -07:00
Bill McCloskey
587e22d043 Bug 1333962 - Add nsILabelableRunnable to label runnables like vsync (r=kanru)
MozReview-Commit-ID: FdvqV0LfFsz
2017-08-25 10:28:23 -07:00
Michael Layzell
eab07b465e Bug 1393581 - Name all IdleTaskRunner runnables, r=smaug 2017-08-25 11:24:27 -04:00
Andrea Marchesini
570f15da30 Bug 1393360 - nsMultiplexInputStream should not QI each stream when checking if seekable, cloneable or IPC serializable, r=smaug 2017-08-25 15:32:13 +02:00
Jan de Mooij
a5de55dced Bug 1389510 part 3 - Remove getProperty/setProperty hooks from ClassOps. r=evilpie 2017-08-25 10:12:16 +02:00