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

17169 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 3af63f59c0 Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
2017-09-28 10:49:48 +09:00
Mike Hommey 4fe7459180 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : ac7bb0d7766fce5b6325c34c2868b26eec594e18
2017-09-28 10:37:27 +09:00
Mike Hommey e68b54aab1 Bug 1403366 - Don't use nsDirectoryService::Create in nsDirectoryService::GetCurrentProcessDirectory. r=froydnj
Back in the day, there was no global with an already initialized
DirectoryService. But now there is, and, in fact,
GetCurrentProcessDirectory already errors out if that global is not set
by the time it's called. All calling nsDirectoryService::Create achieves
is doing the check again and calling QueryInterface, which we don't need
to do anyways.

--HG--
extra : rebase_source : 32f5080ecb8165cffd601799e72d278b482b0871
2017-09-28 08:46:43 +09:00
Wes Kocher d8985b6e57 Merge inbound to central, a=merge
MozReview-Commit-ID: IUFdbLdYFhX
2017-10-04 16:37:59 -07:00
Sebastian Hengst d4232ad6f1 Backed out changeset c68498143c13 (bug 1403771) for bustage at dom/file/StreamBlobImpl.cpp:108: 'GetInternalStream' was not declared in this scope. r=backout on a CLOSED TREE 2017-10-04 19:11:13 +02:00
Andrea Marchesini 96a79ce7c9 Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug 2017-10-04 18:51:10 +02:00
Andrea Marchesini fb5c48f638 Bug 1403771 - SlicedInputStream::Read should not call ::Read() of the underlying stream when there is nothing else to read, r=smaug 2017-10-04 13:10:10 +02:00
Sebastian Hengst 9d84c676a9 Backed out changeset 919a4eb29621 (bug 1371699) for frequently asserting at image/SourceBuffer.cpp:473, e.g. in browser-chrome's browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js on OS X and Windows. r=backout 2017-10-03 16:57:29 +02:00
Sebastian Hengst e8e914baa7 Backed out changeset c033bdb24e14 (bug 1371699) 2017-10-03 16:55:02 +02:00
Sebastian Hengst 5377004a68 Backed out changeset 5bda814e3957 (bug 1371699) 2017-10-03 16:54:56 +02:00
Sebastian Hengst 92986dd48f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-03 11:46:17 +02:00
Sebastian Hengst 9a0edde0b2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IRW0W7LuIM7
2017-10-03 11:43:52 +02:00
Andrea Marchesini 4a4b876335 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Andrea Marchesini ff3b280260 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Andrea Marchesini 1297664f63 Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2017-10-03 07:20:17 +02:00
Nicholas Nethercote a6fede36c2 Bug 1384814 - Remove critical address machinery from Mac implementation of MozStackWalk(). r=glandium.
It seemingly hasn't been needed since Mac OS 10.7. A diagnostic assertion that
has been in place for a while hasn't caught any uses of it.

--HG--
extra : rebase_source : 9834849eec9174267c7df8de7fd22840ffa36d8f
2017-10-03 13:53:14 +11:00
Cervantes Yu 0469f7535b Bug 1400294 - Add 'noShell' attribute to nsIProcess to use CreateProcess() for launching a process that doesn't require shell service on Windows. r=froydnj,r=aklotz,r=dmajor
This adds an attribute 'noShell' to nsIProcess that is used to launch a process
using CreateProcess() if we are sure we are launching an executable and don't
require the extra work of the Windows shell service.

MozReview-Commit-ID: 7p0iHCZK1uX
2017-10-03 11:29:14 +08:00
Kyle Machulis 25457d4887 Bug 1402499 - Add NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0 r=bz
Add macro for nsISupports inheriting classes that need cycle
collection and only inherit from one parent, with no interface table
needed. Takes care of map and addref/release calls.

MozReview-Commit-ID: LtTwYH0DeEz

--HG--
extra : rebase_source : d3650209ddd7e28cbf205ac84f152b9763c26bde
2017-09-28 23:21:09 -07:00
Wes Kocher 0196bb1eed Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9KMX1mdjylD
2017-09-29 14:48:25 -07:00
Wes Kocher eb9a2ed0f2 Merge inbound to central, a=merge
MozReview-Commit-ID: IqwKWn7ceHC
2017-09-29 14:47:25 -07:00
Cosm b4871889d9 Bug 1385335 - Use RecursiveMutex in AsyncPanZoomController.r=botond
MozReview-Commit-ID: ETzQVCu1o7z

--HG--
extra : rebase_source : c7126c098f63e8ce12506dfaee0d995091512b06
2017-09-27 08:41:51 +05:30
Kyle Machulis 2ac26c5527 Bug 1403795 - Remove nsIDOMHTMLButtonElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLButtonElement, replacing it
with binding class usage.

MozReview-Commit-ID: CzqRb7lI28W
2017-09-29 11:57:19 -07:00
David Major d381d825e6 Bug 1376638 followup: update comment to reflect code changes. DONTBUILD 2017-09-29 12:25:10 -04:00
Andrew McCreight e9940ac956 Bug 1277260, part 2 - Add and use method to annotate CC crashes with a class name. r=rweiss+418169,smaug
MozReview-Commit-ID: JweRzAC89NS

--HG--
extra : rebase_source : 6290588e1a4d1c8f59bd13bd975aa7c4f13903df
2017-09-15 13:00:17 -07:00
Andrew McCreight 48ee4c9a3f Bug 1277260, part 1 - Make PtrInfo into a class and mark it final. r=smaug
MozReview-Commit-ID: 3UJ89eCkBsd

--HG--
extra : rebase_source : 90cecf5db10f391e6d7eec2bb1d44810fe5fdd3f
2017-09-15 12:35:18 -07:00
Sebastian Hengst 481a987cf9 Backed out changeset 3ac2c898f94f (bug 1403366) for failing xpcshell tests netwerk/test/httpserver/test/test_basic_functionality.js and test_bug337744.js. r=backout 2017-09-29 17:21:29 +02:00
Sebastian Hengst 006ae28b0a Backed out changeset 3eb67e350f38 (bug 1403366) 2017-09-29 17:19:46 +02:00
Sebastian Hengst a4c17f327a Backed out changeset 7e08706f9f34 (bug 1403366) 2017-09-29 17:19:40 +02:00
Sebastian Hengst a4c329d535 Backed out changeset f9db424c4c6a (bug 1403366) 2017-09-29 17:19:29 +02:00
Philippe Normand cf92431595 Bug 1404305 - Include nsCOMArray.h and SystemGroup in nsThreadPool.cpp to fix the build in non-unified mode. r=froydnj
MozReview-Commit-ID: 1bZHw4TS9L1

--HG--
extra : rebase_source : 8ee48871ab0ae82c70ce7eb3bd64e0497891fc97
2017-09-28 14:32:26 +01:00
Philippe Normand e22abc7e90 Bug 1404302 - Include nsQuickSort.h in nsCOMArray.cpp. r=froydnj
This fixes the build in non-unified mode, as nsCOMArray::Sort() method uses
NS_QuickSort().


MozReview-Commit-ID: CDBLIX8D3mL

--HG--
extra : rebase_source : 67902cf10b9311adbd97fecf7906762bb86c52e4
2017-09-28 14:30:29 +01:00
Mike Hommey 87d3bf1331 Bug 1403366 - Remove outdated comment. r=froydnj
--HG--
extra : rebase_source : 5c97f2d6b3a3157de127553bb39fe37f4af2cba8
2017-09-28 11:01:15 +09:00
Mike Hommey feab23649a Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : f7faa6f22ffc56fb4da7ae96eb571a35fa6f615d
2017-09-28 10:49:48 +09:00
Mike Hommey 31399bfad2 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : f61fd84dcc801f84f4838d357c795ce07928a4e6
2017-09-28 10:37:27 +09:00
Mike Hommey a8c37d0520 Bug 1403366 - Don't use nsDirectoryService::Create in nsDirectoryService::GetCurrentProcessDirectory. r=froydnj
Back in the day, there was no global with an already initialized
DirectoryService. But now there is, and, in fact,
GetCurrentProcessDirectory already errors out if that global is not set
by the time it's called. All calling nsDirectoryService::Create achieves
is doing the check again and calling QueryInterface, which we don't need
to do anyways.

--HG--
extra : rebase_source : 519980829be4ff4a0941c0e8d18be5761ece6552
2017-09-28 08:46:43 +09:00
Emilio Cobos Álvarez 76571cb8eb Bug 1404897: Some fixes to allow storing non-copyable types in nsDataHashtable. r=froydnj
MozReview-Commit-ID: HaBT0igj9Yn

--HG--
extra : rebase_source : 19cc5135601931bd5a47157e3bbbd6e064b1961e
2017-10-02 15:24:59 +02:00
Sebastian Hengst 636468f6d3 Backed out changeset e3352dc9d701 (bug 1404897) 2017-10-04 12:55:22 +02:00
Emilio Cobos Álvarez c59ce1be20 Bug 1404897: Some fixes to allow storing non-copyable types in nsDataHashtable. r=froydnj
MozReview-Commit-ID: HaBT0igj9Yn

--HG--
extra : rebase_source : bf20cddb302f4de3a20797afe0872dcb43b8bdae
2017-10-02 15:24:59 +02:00
Sebastian Hengst 2dbbc650a4 Backed out changeset 9389dd982590 (bug 1404897) 2017-10-04 11:24:36 +02:00
Emilio Cobos Álvarez 0ed05a9a4e Bug 1404897: Some fixes to allow storing non-copyable types in nsDataHashtable. r=froydnj
MozReview-Commit-ID: HaBT0igj9Yn
2017-10-04 11:01:31 +02:00
Nicholas Nethercote 9e0714dd26 Bug 1403506 - Remove nsTFixedString<T>. r=erahm.
(patch is actually r=erahm,mystor)

nsTFixedString<T> is only used as a base class for nsTAutoStringN<T, N>, so
this patch merges the former into the latter, cutting some code and simplifying
the string class hierarchy.

Because the "Fixed" name is now gone, the patch also renames
StringDataFlags::FIXED as INLINE and ClassDataFlags::FIXED as INLINE.

The patch also removes nsFixed[C]String and ns_auto_[c]string! from Rust code
because nsAutoString can't be implemented directly in Rust due to its move
semantics. There were only two uses of ns_auto_string! outside of tests so this
seems like a minor loss.

MozReview-Commit-ID: 8ntximghiut

--HG--
extra : rebase_source : f36edbae0553adcfee356fb8b311097ff7424786
2017-09-27 20:19:33 +10:00
Sebastian Hengst 91443682cd Backed out changeset bc7ca663b817 (bug 1403366) because it depended on backed out bug 1405174. r=backout 2017-10-04 01:27:50 +02:00
Sebastian Hengst 1d5497084d Backed out changeset 582d112281f9 (bug 1403366) 2017-10-04 01:27:07 +02:00
Sebastian Hengst 2d086eadde Backed out changeset 207925bbf88d (bug 1403366) 2017-10-04 01:27:02 +02:00
Sebastian Hengst ce032a9797 Backed out changeset 4a0129621fe8 (bug 1403366) 2017-10-04 01:26:51 +02:00
Mike Hommey 825dd58cc6 Bug 1403366 - Remove outdated comment. r=froydnj
--HG--
extra : rebase_source : 810e0c072c2effb6eb1f3e3c3baef5dde69eee86
2017-09-28 11:01:15 +09:00
Mike Hommey 863d6e0695 Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
2017-09-28 10:49:48 +09:00
Mike Hommey 3b34606aa6 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : ac7bb0d7766fce5b6325c34c2868b26eec594e18
2017-09-28 10:37:27 +09:00
Mike Hommey 94d52fe4c7 Bug 1403366 - Don't use nsDirectoryService::Create in nsDirectoryService::GetCurrentProcessDirectory. r=froydnj
Back in the day, there was no global with an already initialized
DirectoryService. But now there is, and, in fact,
GetCurrentProcessDirectory already errors out if that global is not set
by the time it's called. All calling nsDirectoryService::Create achieves
is doing the check again and calling QueryInterface, which we don't need
to do anyways.

--HG--
extra : rebase_source : 32f5080ecb8165cffd601799e72d278b482b0871
2017-09-28 08:46:43 +09:00
Kyle Machulis e6d0a7ad13 Bug 1402180 - Remove nsIDOMHTMLAreaElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAreaElement, replacing it
with binding class usage.

MozReview-Commit-ID: IaX4JFTPZn6

--HG--
extra : rebase_source : 79f9200c6ff9e081a5d9bc21eaa605f88caa99e9
2017-09-21 17:52:28 -07:00
Michael Layzell 8b222e2445 Bug 1403545 - Stop allocating in fmt::Write for nsA[C]String, r=froydnj
MozReview-Commit-ID: 6EOJ8QBrwXK
2017-09-27 12:19:29 -07:00
Sebastian Hengst 72d1ea4a4b merge mozilla-central to autoland. r=merge a=merge 2017-09-27 11:49:57 +02:00
Wes Kocher acf8913934 Merge m-c to inbound, a=merge
MozReview-Commit-ID: IsbKCdZU2Ui
2017-09-26 17:14:31 -07:00
Wes Kocher a341b32d06 Merge autoland to central, a=merge
MozReview-Commit-ID: 8B7y2ULc04
2017-09-26 17:11:14 -07:00
Wes Kocher 22a72df7fe Merge inbound to m-c a=merge
MozReview-Commit-ID: 6viJ4wRxLa8
2017-09-26 15:54:51 -07:00
Sebastian Hengst 5ed0b93c50 Backed out changeset 26805294a547 (bug 1389650) 2017-09-26 10:47:41 +02:00
Kyle Machulis a3876f104a Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-26 11:41:28 -07:00
Jean-Yves Avenard 918e171099 Bug 1403100 - Fix compilation on High Sierra (10.13). r=froydnj
MozReview-Commit-ID: B3B2YeUTlAz

--HG--
extra : rebase_source : e58b694bb7c5b0e3c9ae73f0d3f0b2d16f91019d
2017-09-26 11:52:29 +02:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Bevis Tseng da72a5478c Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm
--HG--
extra : rebase_source : ffccc53b6b1055d7cfeb281ee145b897807a7810
2017-09-13 11:59:35 +08:00
Kyle Machulis e2ace7d91f Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-25 23:12:44 -07:00
Nicholas Nethercote 041d2fa02a Bug 1400459 (part 1) - Remove return value from nsIAtom::ToUTF8String(). r=froydnj.
It's infallible.

--HG--
extra : rebase_source : 0b1e03c65233a227d84efeb9717a7cb1c464e4c8
2017-09-25 16:38:18 +10:00
Nicholas Nethercote 5018bb4f9b Bug 1401873 - Remove nsHtml5Atom. r=froydnj,hsivonen.
nsHtml5Atoms are very similar to dynamic nsAtoms. This patch removes the former
in favour of the latter, which leaves nsAtom as the only subclass of nsIAtom.

nsAtom::mKind is still used to distinguish dynamic atoms from HTML5 atoms, and
the HTML5 parser still uses manual memory management to handle its HTML5 atoms.

nsHtml5AtomEntry::mAtom had to be changed from an nsAutoPtr to a raw pointer
because nsAtom's destructor is private.

MozReview-Commit-ID: 1pBzwkog3ut

--HG--
extra : rebase_source : fbb819e527cb30606348da9ce3eede62e00fb936
2017-09-21 14:02:05 +10:00
Nicholas Nethercote de07428d79 Bug 1401873 - Expose nsAtom in nsIAtom.h. r=froydnj.
This patch moves nsAtom's declaration to nsIAtom.h. In order to keep most of
nsAtom's members private the patch also does the following.

- It introduces a new class, nsAtomFriend, which encapsulates the functions
  that will need access to nsAtom's private members.

- It moves GCKind, GCAtomTable(), and GCAtomTableLocked() out of nsAtom.

- It removes the factory methods, and replaces their uses with direct
  constructor calls.

MozReview-Commit-ID: L8vfrHsR2cS

--HG--
extra : rebase_source : d38a65515ae82c355966ca80ab235bea11b638af
2017-09-25 16:30:32 +10:00
Nicholas Nethercote fcd9a33eac Bug 1401873 - Rename Atom as nsAtom. r=froydnj.
Because it's going to be exposed via nsIAtom.h in the next few patches.

MozReview-Commit-ID: A81s1nWrvmB

--HG--
extra : rebase_source : 43990feb460fc7343c994f72fb6c6679a3aeb1cc
2017-09-21 12:36:53 +10:00
Wes Kocher 47b3660c80 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 8wTTCUkrY2i
2017-09-25 16:43:51 -07:00
Michael Layzell 8e9f0c50e6 Bug 1383411 - Introduce a distinction between nsCStr<'a> and nsCString, r=froydnj 2017-09-25 18:14:43 -04:00
Tom Ritter a24cf9bf2e Bug 1402328 Use a Dummy template parameter to avoid fully specializing structs inside of template classes r=froydnj
Full specialization is allowed in MSVC, but not in gcc.

MozReview-Commit-ID: 9QI6YWc5Rvr

--HG--
extra : rebase_source : 7387899a6d76832afbe15e088b80a82adee59ca3
2017-09-22 10:26:26 -05:00
Chris Peterson 1ca3d5aa46 Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: B5Y8KyExPQ8

--HG--
extra : rebase_source : e27b266c145daa5acd887e998c6d5b408101e1db
extra : source : 33f49977a33cbdb1c7127871b940eefccc018f65
2017-09-06 15:00:31 -07:00
Chris Peterson a0c8081df4 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK

--HG--
extra : rebase_source : 115842c37a40041bdca7b4e1ff0a5680b02ced15
extra : source : 90bfff9c01d80086cdc17637f310e898fea295ea
2017-09-06 01:13:45 -07:00
Chris Peterson 10073693ba Bug 870698 - Part 3: Replace Insert("") with InsertLiteral(""). r=erahm
MozReview-Commit-ID: 7ERQfcVAiRx

--HG--
extra : rebase_source : de006c4c32f91bf184d9197e920d546253657f82
extra : intermediate-source : 1e875e7bf42881fd1a104501ad379d9f1cdc3c33
extra : source : 9a43a6935a1ce9bd52020fd816cc6c1686aa8564
2017-09-05 12:41:31 -07:00
Chris Peterson 45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Chris Peterson 9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
Kyle Machulis 9b4ac7e03f Bug 1402102 - Remove nsIDOMHTMLObjectElement; r=bz
Removes the nsIDOMHTMLObjectElement XPCOM interface, replacing it with
HTMLObjectElement and FromContent conversion usage.

MozReview-Commit-ID: dmsjSO97uh

--HG--
extra : rebase_source : 9b2c25b8681f754bc34233afccdb6fc5d38f0804
2017-09-22 17:05:12 -07:00
Nicholas Nethercote e3c9cbb969 Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm.
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.

--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
2017-09-22 14:35:46 +10:00
Nicholas Nethercote 225f3a87e4 Bug 1400193 (part 2) - Shrink PLDHashTable. r=froydnj.
This patch reduces sizeof(PLDHashTable) as follows.

- 64-bit: from 40 bytes to 32
- 32-bit: from 28 bytes to 20

It does this by doing the following.

- It moves mGeneration from EntryStore to PLDHashTable, to avoid unnecessary
  padding on 64-bit. This requires tweaking EntryStore::Set() as explained in a
  comment.

- It also shrinks mGeneration from uint32_t to uint16_t, saving 2 bytes of
  data.

- It shrinks mEntrySize from uint32_t to uint8_t, to cut 3 bytes of data.

- It shrinks mHashShift from int16_t to uint8_t, trimming another byte of data,
  and moves it, saving another 2 bytes of padding.

And it reorders the fields so the word-sized ones are at the start, which makes
it easier to imagine the memory layout.

The patch also adds a test, and fixes some misordered function arguments in
existing tests.

--HG--
extra : rebase_source : 6ed6f7be68477fd4a82f07dd2f51c1f1d9b92dcc
2017-09-15 20:04:29 +10:00
Nicholas Nethercote 6061f358d7 Bug 1400193 (part 1) - Fix subtle bug in PLDHashTable's move constructor. r=froydnj.
The current code replaces one PLDHashTable's mGeneration with another. If the
two generation values happen to be equal, it will look as though the storage
hasn't changed when really it has.

The fix is to use EntryStore::Set() to update mEntryStore, which increments
mGeneration appropriately.

--HG--
extra : rebase_source : d1779a143746c8d1a3e67bc3685e703496206b0f
2017-09-15 20:02:33 +10:00
Wes Kocher 640a5d3c46 Merge m-c to inbound, a=merge
MozReview-Commit-ID: IsEMW5gXG3W
2017-09-21 17:04:36 -07:00
Nicholas Nethercote 1aef116268 Bug 1401100 - Remove nsIMemoryReporterCallback. r=erahm.
nsIHandleReportCallback, typedef of nsIMemoryReporterCallback, has been the
preferred name for a long time and is used in most places. This patch removes
nsIMemoryReporterCallback.

--HG--
extra : rebase_source : c675076b4f98d93d96235dad890e31e0b0e6c277
2017-09-22 08:09:29 +10:00
Tom Tromey f993bb28d0 Bug 1401821 - nsTextFormatter "*" width argument comes before the actual argument; r=froydnj
Bug 1388789 introduced a bug breaking formats like "%*.f".  The problem
was that the next "natural" argument was taken before the "*" width
argument.

MozReview-Commit-ID: BZack9faY7a

--HG--
extra : rebase_source : a14485914ef9e29e38f29be6c1df1372ce5e722f
2017-09-21 09:43:28 -06:00
ffxbld ddbf9d22ec Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release
MozReview-Commit-ID: Equ8FrTJpTj
2017-09-21 16:42:31 +02:00
Sebastian Hengst 7eec7a0a11 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: mr7OYuaLKE
2017-09-21 15:23:43 +02:00
Wes Kocher 5d514ba8e9 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 2XyrMOdIWok
2017-09-20 17:39:08 -07:00
Wes Kocher a6b8d9e91b Merge inbound to central, a=merge
MozReview-Commit-ID: JpqY5uEi1nf
2017-09-20 17:18:21 -07:00
Nathan Froyd 3393422869 Bug 1401662 - don't inline nsThreadManager::get(); r=erahm
Defining get() in the declaration of nsThreadManager implicitly sticks
an "inline" on the function, which is not what we want: inlining it
spreads around a lot of static initialization code.  Providing an
out-of-line definition is much better in terms of code size.
2017-09-20 17:10:20 -04:00
Byron Campen [:bwc] 6b3da0609f Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings
MozReview-Commit-ID: JjYScKwyika

--HG--
extra : rebase_source : a5a8a17f86459ace51d9250454bd4cf1433130b0
2017-09-14 12:19:24 -05:00
Tom Tromey 971dbd3853 Bug 1388789 - clean up \0 emission in nsTextFormatter; r=froydnj
nsTextFormatter unconditionally emitted a trailing \0, leading some code
elsewhere to have to work around this.  This changes the code to only
emit it in snprintf.

MozReview-Commit-ID: G3CBpAPp9Tn

--HG--
extra : rebase_source : 36666476a4f796e2553c9fa31daa54d245ae3b5f
2017-09-06 09:38:58 -06:00
Tom Tromey 2165753f7b Bug 1388789 - normalize null string handling in nsTextFormatter; r=froydnj
The char* and char16_t* cases handled null strings differently;
normalize them to both emit "(null)".

MozReview-Commit-ID: IzRkc3pSSjl

--HG--
extra : rebase_source : f43a1a852a2c8aa3d6607c7202f7cd42fdd5740a
2017-09-06 08:38:44 -06:00
Tom Tromey f2a652249e Bug 1388789 - make nsTextFormatter runtime type-safe; r=froydnj
Change nsTextFormatter functions to template functions, box their
arguments, and then make the formatter mostly impervious to type
mismatches.  Most formatting is done according to the type of the actual
argument.

MozReview-Commit-ID: H8WmyxFCb7s

--HG--
extra : rebase_source : ad98ad6243825f1a892fc6a641d155e239b12a6b
2017-09-01 14:03:56 -06:00
Tom Tromey 0d7e17591f Bug 1388789 - change return values of nsTextFormatter::vs{s,v}printf; r=froydnj
nsTextFormatter::vsnprintf is defined to return uint32_t(-1) on error.
However, it was not doing this.

nsTextFormatter::vssprintf is defined as infallible; enforce this by
having it return void.

MozReview-Commit-ID: LdOhIHzRvAT

--HG--
extra : rebase_source : 7164eb47a89ecebfa50d40684eea1325de0172ba
2017-09-05 13:17:49 -06:00
Tom Tromey 586209d1a8 Bug 1388789 - handle unrecognized escapes in nsTextFormatter; r=froydnj
nsTextFormatter tried to pass unrecognized escapes in the format string
through to the output.  However, if the format held a width or
precision, that text was not output.  It seems better to me to try to
preserve the format text as-is.

MozReview-Commit-ID: HoBykpfzK7C

--HG--
extra : rebase_source : 9b071db3800e3e75cabb4995a920818dfb35b03d
2017-09-01 08:31:49 -06:00
Tom Tromey f6829c2b79 Bug 1388789 - replace hex strings with static arrays; r=froydnj
nsTextFormatter used nsAutoString for arrays of hex digits; but this
didn't seem to provide any benefit.

MozReview-Commit-ID: EYHtnAzJL8h

--HG--
extra : rebase_source : 6906075f06478b7c10229201de46e36d08d1f7f8
2017-09-01 06:25:11 -06:00
Tom Tromey 28f29da69d Bug 1388789 - remove prio.h include from nsTextFormatter.h; r=froydnj
This header is not needed here.

MozReview-Commit-ID: 1msozRXsHXR

--HG--
extra : rebase_source : 93e624fb5dd938cee6019fd30991b210e21f0aae
2017-08-31 15:22:36 -06:00
Tom Tromey fc652f4718 Bug 1388789 - make va_list nsTextFormatter private; r=froydnj
The runtime type-checking rewrite of nsTextFormatter will not support
va_list uses.  So, make these functions private and fix the sole user.

MozReview-Commit-ID: IBWALVzIcHC

--HG--
extra : rebase_source : a822697c81c1a054359fc2ecd894d51f95686548
2017-08-31 15:21:37 -06:00
Olli Pettay eb98442ad3 Bug 1400520 - VisitEntries should decrease the length of mEntries the optimal amount, r=mccr8
--HG--
extra : rebase_source : 92ab173641f816df8ff81f4910e796051031a74d
2017-09-20 13:15:19 +03:00
Sebastian Hengst 3af55cf214 Backed out changeset d67b9fdabf9d (bug 1399789) on suspicion of causing Android build bustage. r=backout 2017-09-20 11:42:17 +02:00
Jan Varga b965853990 Bug 1399789 - Bring back nsSubstringSplitter/nsCSubstringSplitter forward declarations; r=erahm 2017-09-20 10:53:01 +02:00
Boris Zbarsky 203072cfe1 Bug 1401171 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-09-19 16:26:21 +02:00
Sebastian Hengst 7973633f84 Backed out changeset 3c9e25405f59 (bug 1401204) an request from baku for landing with wrong bug number. r=backout 2017-09-19 16:25:20 +02:00
Boris Zbarsky 5c70c28414 Bug 1401204 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-11 00:07:23 -04:00
Andrew McCreight 7a52e95946 Bug 1400374 - Fix compiler warning in FixGrayBits. r=smaug
The compiler complains because a postfix increment is done inside of an assert.

MozReview-Commit-ID: LSRsWMn9Tlj

--HG--
extra : rebase_source : 18539a430c3d84675c602699be9a5a62dd477fec
2017-09-15 13:01:15 -07:00
Olli Pettay 478b3b1343 Bug 1405821 - Move microtask handling to CycleCollectedJSContext, r=baku 2017-10-05 18:34:12 +03:00
Sebastian Hengst b86bd8d413 Backed out changeset 2e253e370b8d (bug 1371699) for frequently assertin in browser-chrome at SourceBuffer.cpp:473. r=backout on a CLOSED TREE 2017-10-05 13:12:36 +02:00
Sebastian Hengst 15b8e9a53b Backed out changeset 097c44e15165 (bug 1371699) 2017-10-05 13:10:55 +02:00
Sebastian Hengst 93494fca0a Backed out changeset b88b3fbd7deb (bug 1371699) 2017-10-05 13:10:49 +02:00
Sebastian Hengst 449b6fdffb Backed out changeset 950c069a0192 (bug 1371699) 2017-10-05 13:10:44 +02:00
Sebastian Hengst fd1c572923 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-05 11:47:25 +02:00
Andrea Marchesini d1f7ca1095 Bug 1403706 - Remove race conditions in temporary blob - part 3 - NS_OpenAnonymousTemporaryNsIFile, r=smaug 2017-10-05 07:41:41 +02:00
Andrea Marchesini cccac16f60 Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug 2017-10-05 07:38:48 +02:00
Andrea Marchesini 00a01b8402 Bug 1371699 - NonBlockingAsyncInputStream::ReadSegments passes the correct stream to the writer callback, r=froydnj 2017-10-04 11:46:34 +02:00
Andrea Marchesini 3d4ceae380 Bug 1371699 - Tests for NonBlockingAsyncInputStream, r=froydnj 2017-10-03 07:20:18 +02:00
Andrea Marchesini 1867437172 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Andrea Marchesini 952e5f8ead Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2017-10-03 07:20:17 +02:00
Andrew McCreight 59c846ae8d Bug 1408459, part 2 - Remove unused declaration of NS_MeanAndStdDev(). r=erahm
Also, fix up the include guard in that file.

MozReview-Commit-ID: I3RGDb5P7Yn

--HG--
extra : rebase_source : 158f860cba8fcab31f9a895294f74327d964dcd1
2017-10-15 08:30:57 -07:00
Philippe Normand ae8111551f Bug 1408951 - Fix non-unified build in ErrorNames.cpp. r=froydnj
There is no use mozilla namespace statement in this compilation unit, so the
call to GetErrorName() has to be prefixed with the mozilla namespace.

MozReview-Commit-ID: G3caP2v9PFF

--HG--
extra : rebase_source : 9aebe0711cf8ad81dc47592521a4f29b4f75caab
2017-10-16 11:03:21 +02:00
Tomislav Jovanovic 8a81eff787 Bug 1386427 - Part 1: Add XRE*NativeManifests locations to dirsvc r=kmag
MozReview-Commit-ID: DoJIP6QZ5AX

--HG--
extra : rebase_source : 8351f66a4ddbe8a7c5a7fdf0dcc96288d060f53a
2017-09-12 18:58:23 +02:00
Wes Kocher 1ea82f66aa Merge m-c to autoland, a=merge
MozReview-Commit-ID: AHxJvcR2Tpa
2017-09-20 17:47:16 -07:00
Blake Kaplan 04b86e2150 Bug 1398393 - Set Servo thread state on cooperative threads. r=billm
By doing this we avoid triggering assertions in the Servo code that ensure
we have registered the thread with Servo and set the proper state on it.

MozReview-Commit-ID: K6qHrYoQDLm

--HG--
extra : rebase_source : d01b0aad42273f6b92b7cfd5f5fe17ffe7b4cda0
2017-09-08 16:50:34 -07:00
Blake Kaplan c1ce54a82a Bug 1401412 - Destroy this singleton during XPCOM shutdown. r=smaug
Unfortunately, this needed some additional trickery in order to keep its
constructor "private". I stole this trick from [1]. With this patch, we tear
down the statistics object during XPCOM shutdown intead of after it. I don't
believe that we need the object to live past the ClearOnShutdown destructors.

[1] http://rienajouter.blogspot.com/2014/10/makeshared-and-makeunique-for-classes.html

MozReview-Commit-ID: JsiN6Bq9Yp4

--HG--
extra : rebase_source : dd26c8e6906a6c9fd500c28379f8c63fd7c3ad6a
2017-09-19 17:38:05 -07:00
Bill McCloskey 7ccc0ef499 Bug 1404629 - Make Queue emptiness assertion DEBUG-only (r=froydnj)
MozReview-Commit-ID: HIAJKbdiBCf
2017-10-11 14:05:32 -07:00
Philippe Normand af237419fa Bug 1402824 - Include nsComponentManagerUtils.h in nsThreadUtils.cpp to fix non-unified build. r=billm
do_CreateInstance was used without prior declaration.

MozReview-Commit-ID: 4LkXAcZytM7

--HG--
extra : rebase_source : a983330be02ed058a109ba3bbfd6ecdd3f2ddf56
2017-09-25 11:01:25 +01:00
Philippe Normand 41218b0c60 Bug 1402824 - Include LabeledEventQueue.h in ThreadEventQueue.cpp to fix non-unified build. r=billm
LabeledEventQueue was used without prior declaration.

MozReview-Commit-ID: 3aqGDb0cZFY

--HG--
extra : rebase_source : 08e207b2024e5ba1be1eb0c55ddbe7b0fc405637
2017-09-25 10:59:47 +01:00
Philippe Normand 98e504e3be Bug 1402824 - Include AbstractThread in SystemGroup.cpp to fix non-unified build. r=billm
AbstractThread was used without prior declaration.

MozReview-Commit-ID: BmP83mmjX3b

--HG--
extra : rebase_source : 4f079246b7dd6c378eba97897f74a3c9623540df
2017-09-25 10:59:02 +01:00
Philippe Normand 4e80469013 Bug 1402824 - Include nsIThreadInteral.h in SynchronizedEventQueue to fix non-unified. r=billm
nsIThreadObserver (defined in nsIThreadInternal.h) was used without prior
declaration.

MozReview-Commit-ID: 9cSuERgUPtl

--HG--
extra : rebase_source : 15219cba6f5a41c42aa1103d8c958a55ac3b9af0
2017-09-25 10:56:13 +01:00
Philippe Normand 8bb48e0de1 Bug 1402824 - Add missing includes in Scheduler.h to fix non-unified build. r=billm
nsTArray and EventLoopActivation were used without prior declaration.

MozReview-Commit-ID: C05YG6Nzh52

--HG--
extra : rebase_source : 3f78b6a1d73f4d59d3aac4b2da79c27cae404897
2017-09-25 10:55:10 +01:00
Philippe Normand 5b8e8cc97d Bug 1402824 - Include Linkedlist.h in LabeledEventQueue to fix non-unified build. r=billm
The LinkedList.h header is requires for the sSchedulerGroups variable
declaration.

MozReview-Commit-ID: 6T0WPKQER9S

--HG--
extra : rebase_source : 545e60bdec4e186a03cb20e342e561e104abcd98
2017-09-25 10:51:41 +01:00
Philippe Normand 7f9b32afd8 Bug 1402824 - Add missing includes in PrioritizedEventQueue to fix non-unified build. r=billm
InputEventStatistics::Get() requires the InputEventStatistics.h #include.
MakeScopeExit() requires the ScopeExit.h #include.
LabeledEventQueue.h is required for the PrioritizedEventQueue class.

MozReview-Commit-ID: 7gRwhV3YQXw

--HG--
extra : rebase_source : 54b56317b2876db2ed679e9f47ffb87fdf83cdd2
2017-09-25 10:50:04 +01:00
Philippe Normand 5008d0d827 Bug 1402824 - Include nsTArray.h in InputEventStatistics.h to fix non-unified build. r=smaug
The nsTArray type was used without prior declaration.

MozReview-Commit-ID: KMUgXO2kBIY

--HG--
extra : rebase_source : 671ffe885ae7220bff746d433f55196519d05b8c
2017-09-25 10:45:25 +01:00
Philippe Normand 342808b8f7 Bug 1402824 - Include nsIRunnable in EventQueue.cpp to fix non-unified build. r=billm
nsIRunnable was used without prior declaration.

MozReview-Commit-ID: CVEkaw6xBsC

--HG--
extra : rebase_source : 06c71dfada5e26725d7771284a9f400bf7b5fdd8
2017-09-25 10:43:30 +01:00
Philippe Normand 1c42fb2d93 Bug 1402824 - Add missing includes in CooperativeThreadPool to fix non-unified build. r=billm
nsCOMPtr and nsThreadPoolNaming types were used without prior
declaration.

MozReview-Commit-ID: Gt7gksujs13

--HG--
extra : rebase_source : 57bbdb4f0d7ae0789dfc095fd4b6c99ad780f1ad
2017-09-25 10:37:31 +01:00
Philippe Normand fb80b50e2e Bug 1399825 - Include nsXULAppAPI.h in nsThreadManager.cpp. r=Ms2ger
This ensures XRE_IsContentProcess() is defined, as it's used in this file.

MozReview-Commit-ID: GwBYcFBiUBK
2017-09-14 12:51:41 +01:00
Sebastian Hengst 123fb86836 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-14 00:15:34 +02:00
Sebastian Hengst 006a58c35d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 2iVDKexRjxu
2017-09-13 23:58:43 +02:00
Nathan Froyd cc6fc72d00 Bug 1399315 - declare explicit instantiations of Compare as NS_FASTCALL; r=erahm
The template declaration and definition of Compare use NS_FASTCALL,
while the explicit instantiation of Compare does not, which produces
complaints from newer compilers.  Add NS_FASTCALL to the explicit
instantiation so that things match up.
2017-09-13 17:42:44 -04:00
Ben Kelly 10e7aa67d1 Bug 1398942 P2 Convert nsPipe3.cpp NS_ASSERTION() calls to hard assertions. r=froydnj 2017-09-13 10:36:18 -07:00
Ben Kelly db6fe1b9f4 Bug 1398942 P1 Convert existing nsPipe3.cpp MOZ_ASSERT's to use MOZ_DIAGNOSTIC_ASSERT. r=froydnj 2017-09-13 10:36:15 -07:00
Andrew McCreight f2b46979df Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should throw error. r=froydnj
MozReview-Commit-ID: H6sF4Poz2V0

--HG--
extra : rebase_source : fdbd62049d96e89f0182f750da0dd52ad60eb717
2017-09-12 15:03:14 -07:00
Sebastian Hengst e4a2f44531 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9SALJlvWgoZ
2017-09-13 13:32:44 +02:00
Chris Pearce 8577c280e2 Bug 1399308 - Include nsThreadUtils.h in nsISupportsImpl.cpp. r=froydnj
We're calling GetCurrentVirtualThread() which is defined in nsThreadUtils.h, so
without including nsThreadUtils.h we'll get a compile error if unified builds
are disabled.

MozReview-Commit-ID: JWCigMqNJDi

--HG--
extra : rebase_source : bac48b8f91e6561dfb7afe2828c3652431347c40
2017-09-13 13:45:03 +12:00
Chris Pearce 42abbda386 Bug 1399309 - Make nsTSubstring.cpp include MathAlgorithms.h. r=froydnj
nsTSubstring.cpp is calling RoundUpPow2 which is defined in MathAlgorithms.h.

Without this, we get a build failure in non-unified builds.


MozReview-Commit-ID: Dz7VIZk4dLw

--HG--
extra : rebase_source : 7795784894bfca6e921d38cedaa4f543317c2165
2017-09-13 13:50:05 +12:00
James Cheng 0c675a3236 Bug 1393710 - Add thread name into NS_DebugBreak for better debugging. r=froydnj
MozReview-Commit-ID: AvqajMgtpuh

--HG--
extra : rebase_source : 13e99f103abc9e39ec4cff15f720cd09a9e6b2c5
2017-08-30 11:13:50 +08:00
Sebastian Hengst be553422dd merge mozilla-central to autoland. r=merge a=merge 2017-09-13 11:30:55 +02:00
Olli Pettay 11bf6502b9 Bug 1399160 - Make CCGraphBuilder::BuildGraph to check the budget more often, r=mccr8
--HG--
extra : rebase_source : 8c8593de5e261c9c53b532c0a8f8b61e4567bd3c
2017-09-12 18:59:57 +03:00
Ben Kelly a8bc15e6c1 Bug 1397595 P2 Delay removing nsPipeInputStream from nsPipe list until DrainInputStream() actually runs. r=froydnj 2017-09-12 06:28:58 -07:00
Ben Kelly 244a6712f0 Bug 1397595 P1 Clear nsPipeInputStream mReadCursoe and mReadLimit in DrainInputStream() to keep state consistent with mAvailable. r=froydnj 2017-09-12 06:28:55 -07:00
Sebastian Hengst ecf716b8bb merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CmMBcpJapLy
2017-09-12 11:35:15 +02:00
Bill McCloskey 0f4e7d4fe6 Bug 1398423 - Fix LabeledEventQueue bug with unlabeled events (r=froydnj)
MozReview-Commit-ID: 7ru62QTkya2
2017-09-11 19:11:03 -07:00
Bill McCloskey b9683a5b18 Bug 1398423 - Make linked list of SchedulerGroups static (r=froydnj)
MozReview-Commit-ID: GgfdRlhPiHP
2017-09-11 19:11:01 -07:00
Bill McCloskey 9c4cbe52d1 Bug 1398417 - Fix PrioritizedEventQueue bugs with input event prioritization (r=stone)
MozReview-Commit-ID: 4wk8EUv0h7C
2017-09-11 19:10:57 -07:00
Xidorn Quan 306241f7a1 Bug 1397130 - Use signed integer for gUnusedAtomCount. r=froydnj
MozReview-Commit-ID: 9KweZdyu5WF

--HG--
extra : rebase_source : 81981c706fbde89b18168e39b15dee0cbff27cca
2017-09-06 15:06:16 +10:00
Wes Kocher 05c4aba599 Merge m-c to autoland, a=merge CLOSED TREE
MozReview-Commit-ID: 2dRRh6JLTIL
2017-09-11 15:21:36 -07:00
Olli Pettay 99010cec25 Bug 1398896 - Check the cycle collection budget more often, r=mccr8 2017-09-11 23:57:22 +03:00
Greg Mierzwinski a322b42abf Bug 1394989 - Prevent test_nsIProcess.js from running on linux64-ccov. r=Aryx
This patch skips test_nsIProcess.js when it is running on linux64-ccov.

MozReview-Commit-ID: EZaAcKsy0UA

--HG--
extra : transplant_source : %DD%05C%CD3h%95e%B9%05%F8%7C%D8ZWOh%DBj%CA
2017-09-03 17:46:57 -04:00
Andrea Marchesini 7779bd9850 Bug 1397645 - Optimize IPCBlobInputStream slicing with the introduction of nsICloneableInputStreamWithRange, r=asuth 2017-09-11 17:29:15 +02:00
James Cheng fb6af85bd2 Bug 1397344 - Use Decay to ensure StoreCopyPassByXXX stores the value by copy not by reference. r=gerald
MozReview-Commit-ID: Ec9yjYdQ1jC

--HG--
extra : rebase_source : 6b2f63bf7af9a3c8a879ac6f3865abf6be9a4155
2017-09-07 17:02:13 +08:00
Jim Mathies 910a0df0c0 Bug 1385991 - Provide a chrome side notification informing the user about an incompatible version of JAWS screen reader. r=felipe 2017-09-08 16:05:06 -05:00
Xidorn Quan e5dc8373fe Bug 1397942 - Disable C5037 in xpcom/string to workaround MSVC bug. r=froydnj
MozReview-Commit-ID: Gzx3gtt9eIF

--HG--
extra : rebase_source : 9d7ae1592ece8444265926e78630005d8776c57e
2017-09-08 15:08:39 +10:00
Nomis101 f73dafa53a Bug 1398291 - Remove remaining IsOSXLeopard leftover. r=mstange
--HG--
extra : rebase_source : 1b3cf1183d11c85d34a6dd713f71b7f4cbd002f3
2017-09-08 21:15:00 +02:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Sebastian Hengst 9a6b5140c4 merge mozilla-central to autoland. r=merge a=merge 2017-09-08 11:03:59 +02:00
Bill McCloskey 9cbaae8cfc Bug 1396155 - Allow LabeledEventQueue to be used outside the Scheduler (r=froydnj)
MozReview-Commit-ID: 4yEX39HXh9W
2017-09-07 22:31:34 -07:00
Bill McCloskey 4219e067da Bug 1396155 - Support active tab prioritization and round-robin scheduling in LabeledEventQueue (r=froydnj)
MozReview-Commit-ID: Ax5rWAKN50h
2017-09-07 22:31:34 -07:00
Mike Hommey ca43d9e078 Bug 1398033 - Free dirty pages on memory pressure. r=njn
Free dirty pages appear as "page-cache" in about:memory reports, but
when minimizing memory, and more generally, on memory pressure, they're
currently not force-free()ed on desktop, while they are on mobile.
There doesn't seem to be much reason not to do it on desktop as well,
and it should help reduce the noise in "explicit" allocations measurements
on CI, too.

--HG--
extra : rebase_source : e477532dda5e72eb8797b5bcdc9060ca46106275
2017-09-08 14:50:42 +09:00
Xidorn Quan 749154c86c Bug 1397052 - Add gtest for concurrent accessing. r=froydnj
MozReview-Commit-ID: K3enhwjyGYE

--HG--
extra : rebase_source : 0c714a453e584ba3ceeef7e46e2c13bd6016a179
2017-09-07 10:08:31 +10:00
Eric Rahm 030b39d813 Bug 1393230 - Part 3: Convert the xpcom string classes to be templated on char type. r=njn, r=fitzgen, r=sfink
This removes the double-include macro hackery that we use to define two
separate string types (nsAString and nsACString) in favor of a templated
solution.

Annotations for Valgrind and the JS hazard analysis are updated as well as
the rust binding generations for string code.

--HG--
extra : rebase_source : 63ab2c4620cfcd4b764d42d654c82f30f984d016
extra : source : 9115364cd4aa078c49bba7911069f8178e55166f
2017-08-14 14:22:50 -07:00
Eric Rahm 0617c21c24 Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.

--HG--
extra : rebase_source : 5de1e9335895d65e6db06c510e8887d27be3390f
extra : source : f762f605dd83fc6331161a33e1ef5d54cafbd08d
2017-08-31 15:52:30 -07:00
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
Nicholas Nethercote 42a8532893 Bug 1396694 (part 2) - Replace nsIAtom.idl with nsIAtom.h. r=froydnj.
Now that nsIAtom is non-scriptable, a .idl file isn't needed.

I made the new nsIAtom.h file by starting with a generated nsIAtom.h file, and
then cleaning it up and removing some stuff that wasn't necessary.

--HG--
extra : rebase_source : 9655fd38984512bd96cf5555048f7774414f6d92
2017-09-05 16:07:32 +10:00
Nicholas Nethercote 4a2bc82d4c Bug 1396694 (part 1) - Make nsIAtom non-scriptable. r=froydnj.
This also lets us remove a couple of IDL methods.

--HG--
extra : rebase_source : a62d3f340c77ae8028e35aa9f01f72c5eadf0ed1
2017-09-05 16:06:43 +10: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
Doug Thayer 2e2f55c74a Bug 1382440 - Fix CPUUsageWatcher on OSX and Linux r=froydnj
Properly enclose all relevant details of CPUUsageWatcher in ifdefs
which control whether it should be active or not. Additionally,
apparently clock_gettime is not defined on OSX prior to 10.12, so
this is failing to compile for OSX on the build server, but not
locally. However, clock_get_time and getrusage should cover our
use cases sufficiently.

MozReview-Commit-ID: Ffi6yXLb9gO

--HG--
extra : rebase_source : 84f9cf3b2074883dc6fe6d5a50ff27ffdb008a4f
2017-08-28 14:00:22 -07:00
Doug Thayer 8aae071723 Bug 1382440 - Watch CPU usage in BHR r=froydnj
We would like to be able to see if a given hang in BHR occurred
under high CPU load, as this is an indication that the hang is
of less use to us, since it's likely that the external CPU use
is more responsible for it.

The way this works is fairly simple. We get the system CPU usage
on a scale from 0 to 1, and we get the current process's CPU
usage, also on a scale from 0 to 1, and we subtract the latter
from the former. We then compare this value to a threshold, which
is 1 - (1 / p), where p is the number of (virtual) cores on the
machine. This threshold might need to be tuned, so that we
require an entire physical core in order to not annotate the hang,
but for now it seemed the most reasonable line in the sand.

I should note that this considers CPU usage in child or parent
processes as external. While we are responsible for that CPU usage,
it still indicates that the stack we receive from BHR is of little
value to us, since the source of the actual hang is external to
that stack.

MozReview-Commit-ID: JkG53zq1MdY

--HG--
extra : rebase_source : 16553a9b5eac0a73cd1619c6ee01fa177ca60e58
2017-07-24 13:46:09 -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
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
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
Nathan Froyd 3ac61243c3 Bug 1362449 - part 12 - avoid conversions in nsString Base64 decoding; r=erahm
After all the previous work, we can now base64 decode nsString types
without intermediate conversion steps to nsCString, which is faster and
more memory-efficient.
2017-09-06 16:58:36 -04:00
Nathan Froyd 1506c036e9 Bug 1362449 - part 11 - fix decoding subroutines to cope with wide output types; r=erahm
The result of decoding needs to be an explicit 8-bit type before being
widened to the output type to avoid undesirable effects like sign
extension.
2017-09-06 16:58:36 -04:00
Nathan Froyd bd7f988c20 Bug 1362449 - part 10 - templatify CString base64 decode routine; r=erahm
The current nsString decoding routine indirectly relies on the various
checks this routine performs; making it generic over string types
ensures that we can eventually call it directly from the nsString
decoding routine.
2017-09-06 16:58:36 -04:00
Nathan Froyd d44ccf35ff Bug 1362449 - part 9 - templatify core base64 decode routine; r=erahm
Similar to the work we did for encoding, we're going to want this to be
type-generic.
2017-09-06 16:58:36 -04:00
Nathan Froyd 9cab40ef08 Bug 1362449 - part 8 - use our base64 decoding routines instead of NSPR's; r=erahm
Our base64 decoding routines are a little nicer, and using them is a
necessary step to templating all the necessary routines.
2017-09-06 16:58:36 -04:00
Nathan Froyd 602ae06673 Bug 1362449 - part 7 - make decode routines type-generic; r=erahm
The existing Base64URL code converts from `const char` to `uint8_t`.
We're going to want versions that convert from character types to
character types, so make the decode routines accept generic input and
output types.
2017-09-06 16:58:36 -04:00
Nathan Froyd 84d527a6e0 Bug 1362449 - part 6 - factor out base64url decoding routines; r=erahm
The decoding logic is the same for Base64 and Base64URL; we might as
well reuse the routines that we already have for Base64URL decoding so
we don't make mistakes in the logic.
2017-09-06 16:58:37 -04:00
Nathan Froyd 844466bd3f Bug 1362449 - part 5 - add tables for normal base64 decoding; r=erahm
These tables are nearly identical to the ones for base64url decoding,
but ideally will be slightly more readable, since things are broken up
into sets of eight entries at a time.
2017-09-06 16:58:37 -04:00
Nathan Froyd 7e9f8459e0 Bug 1362449 - part 4 - avoid conversions in nsString Base64 encoding; r=erahm
After all the previous work, we can base64 encoding nsString values
directly into nsString values, without having to go through intermediate
nsCString values.  Since this routine backs base64 routines exposed to
the web, this change should help with OOMs that we see associated with
base64 encoding.
2017-09-06 16:58:37 -04:00
Nathan Froyd d68341d832 Bug 1362449 - part 3 - templatify core nsCString base64 encode routine; r=erahm
The nsACString -> nsACString encode routine has several checks in it for
correct operation, and the nsAString -> nsAString encode routine relies
on those checks happening via the nsACString -> nsACString routine.
Once we start encoding nsAStrings directly, we'll still need those
checks, and the easiest way to ensure they happen is to move the core
base64 encode logic for strings into a templated helper.
2017-09-06 16:58:37 -04:00
Nathan Froyd fe35e37738 Bug 1362449 - part 2 - use our Base64 encode implementation rather than NSPR's; r=erahm
One less use of NSPR is a good thing.  The failure cases that
PL_Base64Encode would have caught for us are:

1. "Truncation".
2. Integer overflow when computing destination string length.
3. Malloc failures.

The first one only gets checked if we pass in zero for the source
length, which we never do.  The latter two only get checked if we pass
in a null pointer for the destination, which we never do.  So removing
the error handling PL_Base64Encode implies here is a good thing.
2017-09-06 16:58:37 -04:00
Nathan Froyd 329a43dc67 Bug 1362449 - part 1a - fix Encode*to* for non-8-bit character types; r=erahm
We need to explicitly reduce the incoming character to 8 bits, rather
than assuming that a conversion to uint32_t will do the right thing.
2017-09-06 16:58:37 -04:00
Nathan Froyd 261bd97797 Bug 1362449 - part 1 - make Base64 encode generic over source character types; r=erahm
We'll need this to implement direct encoding from nsString, and the
changes are trivial.
2017-09-06 16:58:37 -04:00
Nathan Froyd f21b0d5aee Bug 1362449 - part 0 - add test cases for base64 string encode/decode; r=erahm
We already had testcases for streaming encoding, but we didn't have any
for one-shot encoding and decoding.  Let's fix that.
2017-09-06 16:58:37 -04:00
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
Gerald Squelart 7dbe315e25 Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Its return value is never used, and most implementations return nullptr anyway.

MozReview-Commit-ID: 8rxC053mmE8

--HG--
extra : rebase_source : 61a0b8b1373396182efd27d3c01b96e5e5541364
2017-02-09 14:06:36 +11:00
Sebastian Hengst 71854680c0 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-08 00:07:48 +02:00
Andrea Marchesini 536def110e Bug 1397331 - Reduce the number of QI done in nsMultiplexInputStream using counters, r=smaug 2017-09-07 18:39:10 +02:00
Ryan VanderMeulen 4d504e0608 Backed out 3 changesets (bug 1393230) because it touches the servo directory.
Backed out changeset 9115364cd4aa (bug 1393230)
Backed out changeset f762f605dd83 (bug 1393230)
Backed out changeset c366bfc13e86 (bug 1393230)
2017-09-07 09:33:53 -04:00
Eric Rahm 986f3bbc5e Bug 1393230 - Part 3: Convert the xpcom string classes to be templated on char type. r=njn, r=fitzgen, r=sfink
This removes the double-include macro hackery that we use to define two
separate string types (nsAString and nsACString) in favor of a templated
solution.

Annotations for Valgrind and the JS hazard analysis are updated as well as
the rust binding generations for string code.
2017-08-14 14:22:50 -07:00
Eric Rahm 70ece631cb Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.
2017-08-31 15:52:30 -07: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
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
Jory A. Pratt e59d72ca8a Bug 1320560 - Use C99 math isfinite, finite has been depreciated and all modern libc implementations use isfinite. r=froydnj 2017-01-08 11:34:00 -05:00
Nicholas Nethercote 0a0c70a23a Bug 1392881 - Merge StaticAtom and DynamicAtom. r=froydnj.
There's no reason for them to be separate, and we can use the |kind| field to
distinguish the two kinds when necessary.

This lets us remove the duplication of ScriptableToString(), ToUTF8String(),
and ScriptableEquals().

It also lets us use |Atom*| pointers instead of |nsIAtom*| pointers in various
places within nsAtomTable.cpp, which de-virtualizes various calls and removes
the need for some static_casts.

--HG--
extra : rebase_source : 2f9183323446e353f8cc5dcedf57d9dc9a38f0a7
2017-08-24 11:10:04 +10:00