Commit Graph

17997 Commits

Author SHA1 Message Date
Eric Rahm
7bf7fe4f7b Bug 1436768 - Add debug code to LazyLogModule. r=froydnj 2018-05-09 11:16:27 -07:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
Gabriele Svelto
36f613b23b Bug 1464773 - Add low-memory event counts to the crash report; r=ted.mielczarek
MozReview-Commit-ID: 9hf31FSigrI

--HG--
extra : rebase_source : ac71384398f1b7d08e04276b39c7027e43c92747
2018-05-28 10:09:20 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Peter Van der Beken
4efe180435 Bug 1464639 - Call JSPurpleBuffer::Destroy before shutting down the CC. r=mccr8.
Currently we call JSPurpleBuffer::Destroy from
nsCycleCollector::PrepareForGarbageCollection. If the CC is shut down after a call to
nsCycleCollector::GetJSPurpleBuffer (which creates a JSPurpleBuffer) but before a GC
happens, we'll release the strong reference in mJSPurpleBuffer from nsCycleCollector's
destructor but we won't call JSPurpleBuffer::Destroy. That leaves a stale pointer to the
JSPurpleBuffer in the JSHolder's hash.

--HG--
extra : rebase_source : b21a0953ae5b3a470dbd22b8285bffb858f87f13
extra : histedit_source : 1959a4480066fc0920830428023ce01e0768c08e
2018-05-28 22:23:45 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Paolo Amadini
61cbbdb92c Bug 1457719 - Part 4 - Remove the "autorepeatbutton" element. r=bz
The DoMouseClick helper is also removed because no other caller can now pass a null aEvent. Other MouseClicked implementations are also updated since aEvent cannot be null, which was already the case.

MozReview-Commit-ID: 3bTJ6cZW9ZA

--HG--
extra : rebase_source : ae1bafe7144f6f428e2ef4e7047d5c64e0a19e8c
2018-06-01 11:15:56 +01:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini
e3efeac3c5 Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used - gtests, r=froydnj 2018-05-24 07:52:31 +02:00
Andrea Marchesini
77e2dca204 Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used, r=michal, r=froydnj 2018-05-24 07:51:53 +02:00
Andrea Marchesini
1bfb8a0e93 Bug 1464090 - Assertion in InputStreamLengthHelper::GetAsyncLength to avoid dealing with nsIAsyncInputStream, r=mayhemer 2018-05-31 18:12:26 +02:00
Andrea Marchesini
f6ec0a57a4 Bug 1464090 - InputStreamLengthHelper must swap the callback in order to release them on the owning thread, r=mayhemer 2018-05-31 18:12:25 +02:00
Andrea Marchesini
4a5b123402 Bug 1464090 - Implement InputStreamLengthWrapper to make any stream nsIInputStreamLength and nsIAsyncInputStreamLength, r=froydnj 2018-05-31 18:12:25 +02:00
Josh Aas
cedb6a19de Bug 1457941: Add a number of result checks to nsLocalFileWin, avoid use of uninitialized values. r=froydnj 2018-05-30 19:04:00 +03:00
Honza Bambas
38ced61e49 Bug 1463786 - Make mozilla::Tokenizer work also with char16_t, r=froydnj 2018-05-31 03:40:00 +03:00
Bharat Raghunathan
9ad8a95306 Bug 1463183 - Remove all instances of isUniversalBinary since we no longer build universal binaries for macOS r=spohl
MozReview-Commit-ID: FZfVrYtEo13

--HG--
extra : rebase_source : 1ae3d3e3d97255643372b41d0c8a7bdd8ed5537a
2018-05-31 20:04:23 +05:30
Doug Thayer
87bf13e093 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : 59e4a6ced7d14d2a01c0b79e944078ea84cae523
2018-04-29 18:21:20 -07:00
Steve Fink
0680fed494 Bug 1464266 - Rename GCForReason to NonIncrementalGC, r=jonco
--HG--
extra : topic : GCForReason
extra : rebase_source : e81bf7bb8ca0824f8b63f25a46ccbe26c4002325
2018-05-24 16:19:18 -07:00
Panos Astithas
f041fb6e3c Bug 1461851 - Properly add the source URL in the profiler metadata. r=glandium
MozReview-Commit-ID: 53M4bGolmJk

--HG--
extra : rebase_source : f0da66755c92d2937f5fad1f5784f9a81829c951
2018-05-15 16:44:44 -07:00
Gurzau Raul
bcd412f2a9 Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE 2018-05-30 19:03:50 +03:00
Panos Astithas
9be1c58dd1 Bug 1461851 - Properly add the source URL in the profiler metadata. r=glandium
MozReview-Commit-ID: 53M4bGolmJk

--HG--
extra : rebase_source : 17c2f3922d04b1ee7e168837f4440bb1b0abc218
2018-05-15 16:44:44 -07:00
Boris Zbarsky
1d8f39e16f Bug 1455676 part 12. Remove use of nsIDOMNode from xpcom/. r=qdot 2018-05-29 22:58:49 -04:00
Gabriele Svelto
08f7efc25a Bug 1464252 - Remove global observers functionality from the observer service; r=froydnj
MozReview-Commit-ID: HGtG3obDryw

--HG--
extra : rebase_source : fd73d6da5727ca01f6e71fed8d4dc95751d3a7a0
2018-05-24 23:58:31 +02:00
Jan de Mooij
1879873837 Bug 1464134 part 1 - Fix various places to use Realm instead of JSCompartment. r=luke 2018-05-27 11:53:11 +02:00
Dorel Luca
d54a3b06aa Backed out changeset da12c077747f (bug 1448040) for Android build bustage on build/src/obj-firefox/dist/include/mozilla/HangAnnotations.h. CLOSED TREE
--HG--
extra : amend_source : 683201b5a47af3cb7fdcb7426c65f1c9ed713186
2018-05-25 20:13:26 +03:00
Doug Thayer
9765bdd0e0 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : a8840bd26f4b01b756ffa72345ababb625048550
2018-04-29 18:21:20 -07:00
Bogdan Tara
597ad02dc7 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-circle-056-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-circle-056-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-circle-056.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-circle-056.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-052-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-ellipse-052-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-052.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-ellipse-052.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-032-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-polygon-032-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-032.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-polygon-032.html
2018-05-25 13:01:23 +03:00
Kristen Wright
5e4b4031fc Bug 1462138 - Part 1: Add a memory reporter for nsStringBundleService. r=erahm
Added memory reporter in nsStringBundleService. Added SizeOfIncluding/ExcludingThis functions in IStringBundle, StringBundle, ExtensibleStringBundle, PersistentProperties, StringBundleTextOverride.

--HG--
extra : rebase_source : 0756ed2181f02ffe42dd94db282ddf3dfa59047c
2018-05-18 13:16:31 -07:00
Robin Templeton
82800930df bug 1366287 - Part 2.1: Track GMP memory allocation from XPCOM. r=njn
Based on similar functionality for ICU. Define a GMPReporter class and
use its methods for libgmp allocation.

--HG--
extra : rebase_source : 4b536f8a331146109f1cbecf7246f5d4063ec457
2018-05-11 19:42:49 -07:00
Nathan Froyd
f97057b242 Bug 1463893 - make nsThreadStartupEvent's destructor private; r=erahm
Whatever compiler bugs required this destructor to be public have
either long since been fixed, or the compilers themselves have become
obsolete.  Plus we get to fix a wrong comment and make another class
final in the process.
2018-05-24 16:44:37 -04:00
Brindusan Cristian
309ff0bd1f Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-25 03:08:34 +03:00
Gabriele Svelto
ebc0a715dc Bug 1464229 - Remove obsolete CPU-selection attributes when creating a new process on MacOS X; r=froydnj
MozReview-Commit-ID: DvqC9Vl8i6n

--HG--
extra : rebase_source : da4327f3d45f751032f908fa074be43b49af0086
2018-05-24 14:24:53 +02:00
Andreea Pavel
0dada2bb52 Merge inbound to mozilla-central. a=merge 2018-05-24 01:00:23 +03:00
Andrea Marchesini
7dcc1b6880 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 9 - necko and docShell, r=mayhemer, r=smaug 2018-05-23 07:12:36 +02:00
Andrea Marchesini
767ed01fe0 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 7 - nsIMultiplexInputStream exposes nsIInputStreamLength, r=froydnj, r=mayhemer 2018-05-23 07:12:35 +02:00
Andrea Marchesini
f0fb8aa183 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 6 - nsMIMEInputStream exposes nsIInputStreamLength, r=mayhmer 2018-05-23 07:12:35 +02:00
Andrea Marchesini
cb2d1c2cfe Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 4 - SlicedInputStream exposes nsIInputStreamLength, r=froydnj 2018-05-23 07:12:35 +02:00
Andrea Marchesini
1b19a3a663 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 3 - InputStreamLengthHelper, r=froydnj 2018-05-23 07:12:35 +02:00
Andrea Marchesini
86aef1bfc6 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 1 - IDL, r=mayhemer, r=froydnj, r=smaug 2018-05-23 07:12:34 +02:00
Kris Maglione
54d867ef69 Bug 1456485: Part 2 - Allow extensions with the mozillaAddons permission to match restricted schemes. r=zombie
The schema handling for this is currently a bit ugly, for the sake of
simplifying uplift. In the figure, we should find a way to change the schema
pattern matching based on whether or not the extension is privileged.

MozReview-Commit-ID: CU9WR2Ika6k

--HG--
extra : rebase_source : 28e1c43cf0f0efc01b40757e4e65c4ac5d882258
2018-05-09 18:55:59 -07:00
Masayuki Nakano
9ac857639c Bug 1460509 - part 1: Declare NS_ERROR_EDITOR_DESTROYED error code and add a check method to TextEditRules whether it can keep handling edit action at a moment r=m_kato
This patch defines NS_ERROR_EDITOR_DESTROYED error code as an editor module
specific error code.

And creates TextEditRules::CanHandleEditAction() to check if the instance
can keep handling edit action.

MozReview-Commit-ID: 4qECwNBO0yz

--HG--
extra : rebase_source : a925a9b6840d4d06e2792b9fe276e062288b0806
2018-04-24 15:23:01 +09:00
Mike Hommey
29211f60da Bug 1463036 - Use HAVE_ARM_NEON instead of BUILD_ARM_NEON for nsUTF8UtilsNEON.cpp. r=chmanchester
There is a subtle difference between the two, and the conditions used in
nsUTF8Utils.h correspond to HAVE_ARM_NEON, not BUILD_ARM_NEON.
2018-05-23 07:17:05 +09:00
Emilio Cobos Álvarez
f47a8a463b Bug 1451256: Make toolbarpaletteitem always use box layout. r=dholbert
It doesn't really need the button magic.

MozReview-Commit-ID: 390aozlyYZa
2018-05-22 21:55:01 +02:00
Kris Maglione
8340513b0c Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Using concrete class types with static IIDs in QueryInterface methods is a
pretty common pattern which isn't supported by any existing helper macros.
That's lead to separate ad-hoc implementations, with varying degrees of
dodginess, being scattered around the tree.

This patch adds a helper macro with a canonical (and safe) implementation, and
updates existing ad-hoc users to use it.

MozReview-Commit-ID: HaTGF7MN5Cv

--HG--
extra : rebase_source : ace930129d85960d22bc3048ca3bb19bbbd4a63e
extra : histedit_source : 03a87f746d957789d41381e4e1bfcc4fd7eebaf2%2C9c5bae9feeeef7721105db67be0f83e0ded66bb7
2018-05-21 16:33:18 -07:00
Kris Maglione
6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Noemi Erli
d08fe5245d Backed out 2 changesets (bug 1460561) for failures in toolkit/components/extensions/test/mochitest/test_ext_webrequest_upload.html on a CLOSED TREE
Backed out changeset dc358abeba45 (bug 1460561)
Backed out changeset eea17fb77684 (bug 1460561)
2018-05-24 11:58:48 +03:00
Andrea Marchesini
95fd40defd Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used - gtests, r=froydnj 2018-05-24 07:52:31 +02:00
Andrea Marchesini
4d94837722 Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used, r=michal 2018-05-24 07:51:53 +02:00
Randell Jesup
27aae0dbeb Bug 1425930: Handle Broadcast()->Notify() calling RemoveObserver() r=froyd 2018-05-21 15:30:35 -04:00
Andreea Pavel
229a6df6d4 Backed out changeset 9d111a95cfbb (bug 1425930) for build bustages at ../testing/xpcshell/selftest.py::XPCShellTestsTests::testAddTaskSki on a CLOSED TREE 2018-05-21 18:01:29 +03:00
Randell Jesup
ae19cc881a Bug 1425930: Handle Broadcast()->Notify() calling RemoveObserver() r=froyd 2018-05-21 10:35:08 -04:00
Coroiu Cristina
7917fae007 Backed out changeset 4dce0b1b22af (bug 1425930) for causing build bustage on a CLOSED TREE 2018-05-20 23:16:12 +03:00
Randell Jesup
ceedbeadd3 Bug 1425930 - Handle Broadcast()->Notify() calling RemoveObserver(). r=froyd
--HG--
extra : rebase_source : 87dc3560125bbb6c77215777753c9fbc2a34e7f6
2018-05-18 11:15:30 -04:00
Kris Maglione
5ad7ba0bf1 Bug 1462483: Part 1 - Explicitly return a nsIDirectoryEnumerator from nsIFile::GetDirectoryEntries. r=froydnj
All of our GetDirectoryEntries implementations return a
nsIDirectoryEnumerator, and a lot of relies on this, and explicitly QIs to it.
That gets a bit ugly, and in JS code, a bit expensive. We should just return a
directory enumerator directly if that's part of the API contract.

MozReview-Commit-ID: IUeEB1Ih1Wu

--HG--
extra : rebase_source : 6fffb2d4b0f83db1fd270423a195379acef0dfe4
2018-05-17 15:06:48 -07:00
Adam Gashlin
cdb01305b3 Bug 603903 - Part 1: add RegisterApplicationRestart r=jimm
MozReview-Commit-ID: Eb389ih7CIn

--HG--
extra : rebase_source : b8657950fb08b899528d3ac3720a31769b3e14ba
2018-05-15 15:37:45 -07:00
Tom Ritter
102b854208 Bug 1470508 Output the process name in MOZ_LOG r=froydnj 2018-06-22 12:31:35 -05:00
Noemi Erli
ebbfa837ec Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-25 22:15:47 +03:00
Josh Aas
e70eb1edef Bug 1449686 - Remove most XPCOM special directories as they are unused. r=froydnj 2018-06-25 09:55:00 +03:00
Csoregi Natalia
2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Markus Stange
d237156fdc Bug 1464909 - Add the "GC / CC" category to IncrementalFinalizeRunnable::Run. r=smaug
MozReview-Commit-ID: nRSVnJVNTj

--HG--
extra : rebase_source : ce22abc0fcbc11dab5eb2cf1b487a75424b8bab1
2018-05-31 14:08:50 -04:00
Markus Stange
5c8783fa29 Bug 1462784 - Annotate idle stacks in nsThreadPool. r=froydnj
MozReview-Commit-ID: GtHBHQiXpf3

--HG--
extra : rebase_source : 833e61843ca01402bf90559215c87deb43382bdc
2018-05-24 08:58:44 -04:00
Markus Stange
d562be6650 Bug 1462784 - Annotate idle stacks in the main thread event loop. r=froydnj
MozReview-Commit-ID: I4WSeZtXPBD

--HG--
extra : rebase_source : dc2006446e5fee89c3bc0ac2ff4eb81729093565
2018-05-16 13:26:51 -04:00
Markus Stange
423ce68542 Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : 344c380ddaaf42a1fd820a26b762c61ee9e2d524
2018-05-18 17:58:43 -04:00
Markus Stange
973f0de3fa Bug 1462784 - Merge GC and CC categories into one category. r=njn
They're very similar as far as most users of the profiler are concerned, I'd
say, and I don't believe it's worth giving them two different colors in the
activity graphs.

MozReview-Commit-ID: HTqjp56naL3

--HG--
extra : rebase_source : cf8d64bc3e76ed9bb07100081aebfc404845b8bc
2018-05-18 17:23:33 -04:00
Csoregi Natalia
fc2ed6e92a Backed out 18 changesets (bug 1462784) for ESlint failure on FlameGraph.js:1297. CLOSED TREE
Backed out changeset 79556798ff9f (bug 1462784)
Backed out changeset 88321efb673b (bug 1462784)
Backed out changeset 7880f9dc7023 (bug 1462784)
Backed out changeset 71fe35fd1f7e (bug 1462784)
Backed out changeset a543b94b049a (bug 1462784)
Backed out changeset d1ca8b0f2221 (bug 1462784)
Backed out changeset 68eabfbf3c16 (bug 1462784)
Backed out changeset 34e71c789903 (bug 1462784)
Backed out changeset 6fe79d1ca1bd (bug 1462784)
Backed out changeset e5ad2e525ea9 (bug 1462784)
Backed out changeset 329645ff1e23 (bug 1462784)
Backed out changeset e09c38853172 (bug 1462784)
Backed out changeset 0663d1a6d2da (bug 1462784)
Backed out changeset 106967fc29d2 (bug 1462784)
Backed out changeset 99b4a433a8e5 (bug 1462784)
Backed out changeset 1d38a4cf5a4a (bug 1462784)
Backed out changeset 692017229de6 (bug 1462784)
Backed out changeset c2911a626671 (bug 1462784)
2018-06-01 23:42:00 +03:00
Markus Stange
8aaf6f7c90 Bug 1462784 - Annotate idle stacks in nsThreadPool. r=froydnj
MozReview-Commit-ID: GtHBHQiXpf3

--HG--
extra : rebase_source : be3703a710058930bfbcd53463137ab4151356c4
2018-05-24 08:58:44 -04:00
Markus Stange
11e9f7cb35 Bug 1462784 - Annotate idle stacks in the main thread event loop. r=froydnj
MozReview-Commit-ID: I4WSeZtXPBD

--HG--
extra : rebase_source : 34057b3394d0557156a9d5ab82695b352786707d
2018-05-16 13:26:51 -04:00
Markus Stange
3f54b9a3dd Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : f807c14bf6a592e0c651e15b63d1e7d63e4b0159
2018-05-18 17:58:43 -04:00
Markus Stange
f6174e54cf Bug 1462784 - Merge GC and CC categories into one category. r=njn
They're very similar as far as most users of the profiler are concerned, I'd
say, and I don't believe it's worth giving them two different colors in the
activity graphs.

MozReview-Commit-ID: HTqjp56naL3

--HG--
extra : rebase_source : ed1dc54efd143ad64bc21cfc39853ae90477cc9d
2018-05-18 17:23:33 -04:00
Bogdan Tara
3287e1104c Merge inbound to mozilla-central. a=merge 2018-05-18 01:04:08 +03:00
Jan de Mooij
969bbf2190 Bug 1461938 part 1 - Store JS::Realm* instead of JSCompartment* in JSContext. r=luke
--HG--
extra : rebase_source : 7af7e5854bdbe0d750a13e0e8c70a71c2c5f88c3
2018-05-17 18:02:40 +02:00
Cosmin Sabou
30476522a7 Merge mozilla-central to inbound. a=merge 2018-05-17 18:36:08 +03:00
Cosmin Sabou
da499aac68 Merge inbound to mozilla-central. a=merge 2018-05-17 18:28:27 +03:00
Jan de Mooij
575aec161b Bug 1461677 - Rename compartment to realm in the memory reporting code. r=njn 2018-05-17 16:15:18 +02:00
Raymond FOrbes
bcb2d49204 Bug 1460929 - code coverage no longer use _exit on exit r=marco
MozReview-Commit-ID: HtI4hC97dOK

--HG--
extra : rebase_source : 95dccf7e490f9c873a181a7024e4145d55c02185
2018-05-11 15:53:22 -07:00
Cosmin Sabou
b1f0577d88 Merge mozilla-central to autoland. a=merge 2018-05-17 18:29:40 +03:00
Jan de Mooij
c7a435f1ca Bug 1461605 part 2 - Rename JS_{Enter,Leave}Compartment -> JS::{Enter,Leave}Realm. r=luke 2018-05-17 11:00:21 +02:00
Jan de Mooij
17f3983d0f Bug 1461605 part 1 - Rename CompartmentOptions to RealmOptions. r=luke,bz 2018-05-17 10:59:45 +02:00
Adam Gashlin
22530d5691 Bug 1451366: Part 1 - Wait after launch from update and restart, r=mhowell, jimm 2018-05-14 14:43:36 -07:00
Dorel Luca
7285fe0e8b Merge mozilla-central to autoland
--HG--
extra : rebase_source : 28cf949fe5cbd372058adac2d3a9d6e66902e6e3
2018-05-16 00:58:05 +03:00
Nathan Froyd
33635829ac Bug 1459721 - part 7 - remove dist_idl install manifest; r=chmanchester
We no longer need to install the IDL files to the objdir for
processing. \o/
2018-05-15 10:05:23 -04:00
Marco Bonardo
c67bc6cc9a Bug 1430023 - Get rid of some remaining localstore.rdf code. r=mossop
MozReview-Commit-ID: LqqSsb2h1Yv

--HG--
extra : rebase_source : 1a89abfbe75e17ed4be3a9fa52eef2d1db9f99bd
2018-05-09 10:49:35 +02:00
Nika Layzell
3043db4105 Bug 1457972 - Part 10: Make sure to allocate ExtendedVal inline, r=froydnj 2018-05-14 17:55:57 -04:00
Nika Layzell
ca0a0c7f42 Bug 1457972 - Part 6: Ensure the extended types list has some basic types with known indexes, r=mccr8
Currently XPCVariant has some code for working with arrays of a series of basic
types. I want to unify and simplify code which works with nsXPTTypes to always
take the topmost level type (rather than passing in an array element type when
working with an array).

This is pretty easy for most of XPConnect, but XPCVariant occasionally needs to
perform calls on made-up array types, which isn't compatible with the current
implementation. Fortunately, it only needs a very small set of array types. This
patch adds a set of simple types (mostly the arithmetic types and
TD_INTERFACE_IS_TYPE for interfaces) to the extra types array unconditionally
with a known index, for XPCVariant.

An other option I was considering was to consider the value `0xff` in the data
byte on nsXPTType to be a flag which indicates that the array element type is
actually the type immediately following the current nsXPTType object in memory,
but that was incompatible with many of the existing nsXPTType consumers which
copy the nsXPTType objects around (e.g. onto the stack), rather than always
using them by reference, so I decided it was not a good approach to take.
2018-05-14 17:55:56 -04:00
Nika Layzell
e2240ec5a2 Bug 1457972 - Part 4: Remove dipper types, r=mccr8
In XPConnect, native values are passed around within nsXPTCMiniVariant objects.
an [nsXPTCMiniVariant] contains 64-bits of data in a union type.

nsXPTCMiniVariant values are created by the platform-specific glue code and
passed into XPConnect proper when calling from C++ into JS.

When calling from JS into C++, we instead create nsXPTCVariant objects and pass
them into the glue code. These objects have extra information in addition to the
nsXPTCMiniVariant: namely they also have a `type` field with the type stored in
the variant, space for flags, and a `ptr` field which is passed over IPC instead
of the inner nsXPTCMiniVariant when a flag (`PTR_IS_DATA`) is set.

The JSValue type in XPConnect is always passed as a pointer to a JSValue object,
both for in parameters and out parameters. This is handled by making the JSValue
type be unconditionally flagged as [`IsIndirect()`] This flag is also used for
all types of outparameters.

When the `IsIndirect()` flag is set, it means that the actual data is stored in
the nsXPTCVariant's val field, and it sets the flag to tell the glue code to
instead pass the `ptr` field (which is always pointing to the `val` field for
[legacy reasons]) into the C++ code.

In contrast "dipper" is a different and super weird flag. Currently only the
string class types (nsACString & nsAString) are marked as "dipper". A "dipper"
type is always passed as an "in" type (and thus always passed "directly"), even
when it's actually an out parameter.

XPConnect treats these types as though they are pointer types (nsAString*). This
means that there is no space in the nsXPTCVariant to store the actual nsAString
types when passing from JS into C++, so these values have to be allocated by a
different mechanism (in the current code, there is a size 2 buffer for each
string type in the context and once that buffer is exceeded, we heap allocate
the nsString values).

In effect, the current state looks something like this:
+------------+---------------------+---------------------+
| type       | out (xpt/native)    | in (xpt/native)     |
+------------+---------------------+---------------------+
| TD_INT32   | indirect (int32_t*) | direct (int32_t)    |
+------------+---------------------+---------------------+
| TD_JSVAL   | indirect (JSValue*) | indirect (JSValue*) |
+------------+---------------------+---------------------+
| TD_ASTRING | direct (nsAString*) | direct (nsAString*) |
+------------+---------------------+---------------------+

This patch ensures there is enough space in the nsXPTCVariant to fit the
nsString value, and switches string class types to being unconditionally
indirect instead of using the dipper system. This allows us to delete a ton of
dipper-specific code, and unify the indirect and string class codepaths.

This only affects the size of nsXPTCVariant objects, and does not affect
nsXPTCMiniVariant objects. nsXPTCVariant objects are never allocated by the
platform-specific binding code, rather, they are allocated in an AutoTArray on
the stack as part of the CallMethodHelper object.

The size increase is a total of 1 word, so 4 bytes in 32-bit builds, and 8 bytes
in 64-bit builds, which is ignorable for stack allocated objects.

[nsXPTCMiniVariant]: https://searchfox.org/mozilla-central/rev/eb6c5214a63e20a3fff455e92c876287a8d2e188/xpcom/reflect/xptcall/xptcall.h#20-47
[`IsIndirect()`]: https://searchfox.org/mozilla-central/rev/c0d81882c7941c4ff13a50603e37095cdab0d1ea/xpcom/reflect/xptinfo/xptinfo.h#371
[legacy reasons]: https://searchfox.org/mozilla-central/rev/eb6c5214a63e20a3fff455e92c876287a8d2e188/xpcom/reflect/xptcall/xptcall.h#66-79
2018-05-14 17:55:55 -04:00
Nika Layzell
8fd69eedbf Bug 1457972 - Part 3: Remove unnecessary #includes of xptinfo headers, r=mccr8
We are going to want to include some "gecko internal" types in more places in
the codebase, and we have unused includes of some of these headers in non-libxul
files.

This patch just cleans up these unnecssary includes.
2018-05-14 17:55:55 -04:00
Nika Layzell
f20e777cdb Bug 1457972 - Part 2: Remove unused code paths in xpconnect, r=mccr8
Thanks to the changes in the previous patch, we had some unused code which we
can get rid of. This patch just cleans stuff up a bit.
2018-05-14 17:55:54 -04:00
Nika Layzell
73efb8abf3 Bug 1457972 - Part 1: Unify xpconnect cleanup codepaths, r=mccr8
It used to be that in XPConnect there were many different pieces of code for
each place where we may need to clean up some untyped values based on their
nsXPTType information. This was a mess, and meant that every time you needed to
add a new data type you'd have to find every one of these places and add support
for your new type to them.

In fact, this was bad enough that it appears that I missed some places when
adding my webidl support! Which means that in some edge cases we may clean up
one of these values incorrectly D:!

This patch adds a new unified method which performs the cleanup by looking at a
nsXPTType object. The idea is that this function takes a void* which is actually
a T* where T is a value of the nsXPTType parmaeter. It clears the value behind
the pointer to a valid state such that free-ing the memory would not cause any
leaks. e.g. it free(...)s owned pointers and sets the pointer to `nullptr`, and
truncates nsA[C]String values such that they reference the static empty string.

I also modify every one of these custom cleanup codepaths to instead call into
this unified cleanup method.

This also involved some simplification of helper methods in order to make the
implementation cleaner.
2018-05-14 17:55:54 -04:00
Nika Layzell
2d188849ae Bug 1455217 - Part 3: Use the new xpidl Promise type instead of nsISupports, r=bz 2018-05-14 17:55:54 -04:00
Nika Layzell
c9d0fe3dd2 Bug 1455217 - Part 1: Add an explicit Promise type to xpidl, r=mccr8
This type is fairly simple on the idl parsing side of things. I handle it in the
same way that special types such as ns[C]String, nsid, and jsval are handled, by
using a special native type.

The logic for converting the value between C++ and JS follows the existing logic
from the nsISupports <=> JS Promise conversions.
2018-05-14 17:55:53 -04:00
Nika Layzell
e5e1512c1e Bug 1454568 - Support [infallible] on interfaces and domobjects in xpidl, r=froydnj 2018-05-14 17:55:53 -04:00
Peter Van der Beken
50df99ec11 Bug 1453011 - Remove CONTENT_NODE. r=bz.
--HG--
extra : rebase_source : 1d28f42d3272e0ca3d171efae511d291ce5af8d3
2018-04-16 12:58:55 +02:00
Gabriele Svelto
5a541b79f4 Bug 1451005 - Add low commit-space event counts to the memory reporter; r=njn
MozReview-Commit-ID: 1jZwxj427tg

--HG--
extra : rebase_source : 5c5b674ef3094778c0e6aeb8d4abad146604be53
2018-05-16 13:58:10 +02:00
Gabriele Svelto
67a43f4a6a Bug 1451005 - Forward all memory-pressure events to the child processes; r=njn
When memory-pressure events were first used in an e10s environment it was
to implement memory minimization from about:memory. However when low memory
detection was first introduced in Firefox OS an issue arised with this scheme:
every process was using a kernel-based low-latency mechanism to detect low
memory scenarios and send memory-pressure events; but the main process events
were also being forwarded to all child processes causing listeners to be
triggered twice. Because of this -no-forward events were introduced and used.
Currently however low-memory is detected via polling, so there will always be
a significant delay between the beginning of the low-memory scenario and its
detection. Because of this there is no value in having content processes poll
on their own and it's best to have only the main process do it and then
forward the memory-pressure events to all child processes.

MozReview-Commit-ID: AMQOsEgECme

--HG--
extra : rebase_source : 1b408b31dd27940981407f50f2e5f07e354b16d7
2018-05-12 01:21:13 +02:00
Gabriele Svelto
e2c126f409 Bug 1451005 - Introduce a timer-based poller for detecting low-memory scenarios; r=dmajor,njn
This patch introduces a new polling mechanism to detect low-memory scenarios.
The timer fires at a relatively slow pace and stops whenever the user stops
interacting with Firefox to avoid consuming power needlessly. The polling rate
is up to 3 orders of magnitude slower than the current tracker and is
throttled when memory is running low. It also doesn't suffer from data races
that were possible with existing tracker.

Contrary to the old available memory tracker which relied on a
Windows-specific mechanism, this one could be made to work on other platforms
too. The current implementation only supports Windows 64-bit builds though.

MozReview-Commit-ID: CFHuTDqjPbL

--HG--
extra : rebase_source : 92d1f801cc680f9fde8ecfa46c570e3c562a3d01
2018-05-17 14:48:02 +02:00
Peter Van der Beken
ddfc4b6022 Bug 1452981 - Remove qsObjectHelper. r=bz.
--HG--
extra : rebase_source : f87d70c72bd720cd57377b4b70fdf8ecec590086
2018-05-02 11:47:02 +02:00
Markus Stange
3c2f4b195e Bug 1460733 - Rename nsTArrayHeader::sEmptyHdr to extern "C" { sEmptyTArrayHeader } so that thin-vec can link with it. r=froydnj
MozReview-Commit-ID: CjaE7udG9m2

--HG--
extra : rebase_source : 83f36ecf7fe96c6207575ce222a807a629866168
2018-05-10 16:37:27 -04:00
Jan Henning
843d1912b1 Bug 1450314 - Remove unused parameters for memory-pressure notifications. r=gsvelto
"alloc-failure" is completely unused apart from the description text in nsI-
Memory.idl (and has been since before Firefox 17), while "lowering-priority" is
still being checked for in the PuppetWidget, but otherwise unused as well since
the feature using it was decommissioned in bug 1234176.

Since we're touching the PuppetWidget code anyway, we take the opportunity to
add a check for "low-memory-ongoing" instead, since similar as to how things
used to be with "lowering-priority", we want to drop the LayerManager's cached
resources only when receiving a real full memory-pressure event, but not for
subsequent ongoing notifications.

MozReview-Commit-ID: HL03SOU8axe

--HG--
extra : rebase_source : c988769df36d8d77f4770c71d5c5e0d75c3b99af
2018-05-06 13:17:11 +02:00
Andrew McCreight
6c4a1d23f2 Bug 1460636 - Don't trace jsids on ObjectGroup in the cycle collector. r=jonco,sfink
For some reason, the CC spends a lot of time tracing jsids on
ObjectGroups when an addon is installed. This patch avoids that by
adding a canSkipJsids flag to JSTracer, and using it in
ObjectGroup::traceChildren. If this is true, then the tracer is free
to not report every jsid. This flag is set to true for the two CC
tracers.

MozReview-Commit-ID: CWFqQEr0SxV

--HG--
extra : rebase_source : cc31c22717f8990166454db191e0d40c145e09f0
2018-05-11 11:38:58 -07:00
Csoregi Natalia
f034c0ab5d Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-10 12:52:31 +03:00
Kris Maglione
27f3639e38 Bug 1460416: Remove unused static atoms. r=froydnj
These were found using some ugly text searches, so it's possible some unused
atoms remain. In the future, we should enforce removing unused atoms using
static analysis. Or just generate the static atoms table based on string atom
names in our code.

This patch leaves unused RDF atoms in place, since those are being dealt with
in another bug.

MozReview-Commit-ID: 1KpH9KsHzQy

--HG--
extra : rebase_source : 8138faa2b16e847da31861abae2bbc1c7bac4e02
2018-05-09 13:28:05 -07:00
Andrew McCreight
45174e0771 Bug 1457281 - Remove dom.ipc.scheduler pref. r=froydnj
The JS engine has changed the APIs that cooperative scheduling relies
on into immediate crashes. Some users seem to set the prefs, and then
we get a lot of crashes on Nightly. This removes the top-level pref to
save them some grief.

I continue to pass the pref as false to the child process to avoid
weirdness if we somehow we get this far when the parent and child have
different versions.

MozReview-Commit-ID: 3o3yV2efx2r

--HG--
extra : rebase_source : 398c4d77ce3f78f3814ac97882b4a5e3190c44f7
2018-04-26 14:21:25 -07:00
Jan Henning
991ff633f3 Bug 1335148 - Part 2: Introduce notification for end of memory pressure. r=gsvelto,snorp
For Fennec on Android, if we haven't received memory pressure notifications from
the OS for a certain amount of time (in the order of ~15 mins), we assume that
we're no longer under memory pressure. In order to turn the bfcache back on when
that happens, we now want to be able to forward this fact to Gecko as well.

Unfortunately, the way memory pressure is tracked using an atomic variable
doesn't easily allow to fully extend the existing priority rules between "new"
and "ongoing" to include a new "stopping of memory pressure" event. Since we're
not using Dispatch*Eventual*MemoryPressure on Android and therefore the queuing
priority behaviour isn't actually relevant for us, we just ignore that and only
enforce that a pending "new" memory pressure event takes priority over a "stop"
event.

MozReview-Commit-ID: 90C9KogUyvf

--HG--
extra : rebase_source : 4e71a31433557d8d486f941953717a88d5d87e7d
2018-03-30 13:26:24 +02:00
Brendan Dahl
295e2f4aca Bug 1453788 - Allow top level HTML windows to have persistent window state. r=smaug
Move tracking of persistent window state into nsXULWindow. Also, move
special handling of the width/height of the window into nsXULWindow.

MozReview-Commit-ID: LOmHGyYeNSU

--HG--
extra : rebase_source : bcea16eb6209ff789948644a64968a7325cea4ef
2018-04-26 17:53:54 -07:00
Kris Maglione
01c298aca6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU

--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
2018-05-08 18:36:22 -07:00
Chris Peterson
87ddcb8273 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
--HG--
extra : rebase_source : 9bad9e57e2e0363fb315949ac73b869fac0b9a73
2018-05-08 22:21:22 -07:00
Stephen A Pohl
860c14b396 Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-05-08 10:31:44 -04:00
Emilio Cobos Álvarez
29a419dbe6 Bug 1445392: Avoid posting a slotchange event microtask during shutdown. r=smaug
MozReview-Commit-ID: 1ga6cDVRX5
2018-05-08 16:10:28 +02:00
arthur.iakab
2f2f2ffdbf Merge mozilla-central to inbound 2018-05-08 15:44:33 +03:00
Dorel Luca
2b4e625186 Backed out changeset b57df5aa1534 (bug 1457813) for conflict after bug 833098 got backed out. CLOSED TREE 2018-05-08 14:49:35 +03:00
Chris Peterson
5a63a12794 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
Use fatal MOZ_ASSERT or non-fatal NS_ASSERTION instead.

MozReview-Commit-ID: 1QAsgoWpXDn

--HG--
extra : source : 9ca972b6b3e7d3b576e20a0bf412df51d82aad9f
extra : intermediate-source : a909a9d7bc9a53095e963a4bea45f4fc4aa85b72
2018-04-27 21:42:24 -07:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
sotaro
b482332d39 Bug 1457387 - Remove WrExternalLogHandler r=jrmuizel 2018-05-04 14:31:32 +09:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
sotaro
666719aa81 Bug 1456350 - Forward webrender error log to gfxCriticalNote r=bholley 2018-04-27 16:48:39 +09:00
Boris Zbarsky
6bf97b61c0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
Emilio Cobos Álvarez
0faef276ec Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt
MozReview-Commit-ID: H6SRTsDL5Rh
2018-04-26 17:07:39 +02:00
Jeff Walden
04d21ccac0 Bug 1451248. r=jorendorff, r=bz
--HG--
extra : rebase_source : e26439a5954162bdaf332fbd63d623a3810e19e0
2018-04-25 19:40:09 -07:00
Michael Kaply
c2f87a5b92 Bug 1418953 - Remove NS_APP_USER_SEARCH_DIR. r=florian
MozReview-Commit-ID: DYzdJtz5aEH

--HG--
extra : rebase_source : 4dc75dfb011a174b7baf50e6f7faa720d88e4723
2018-04-24 15:19:47 -05:00
Brindusan Cristian
9265429dcd Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-25 00:57:49 +03:00
Brindusan Cristian
59f801793b Merge inbound to mozilla-central. a=merge 2018-04-25 00:50:59 +03:00
Tarek Ziadé
90bafd1f42 Bug 1452580 - remove RELEASE_OR_BETA defines for PerformanceCounter usage - r=baku,erahm,farre
PerformanceCounters are currently disabled in two ways:

- a preference that's off by default "dom.performance.enable_scheduler_timing"
- calls made only for nightly using #ifndef RELEASE_OR_BETA

In order to simplify the code, let's remove the #ifndef and rely only on the pref.
That will also allows us to use the feature in every version going forward.

The performance will not be impacted since the current code is already using
the (cached) pref value to determine if the counters are used.

MozReview-Commit-ID: 47t2M1O13aH

--HG--
extra : rebase_source : e129e1829f1dc37c019e50e156474c4876d6d6cb
2018-04-24 22:03:06 +02:00
Boris Zbarsky
4b6ed4c011 Bug 1456261. Add cycle collection bits for WebIDL dictionaries. r=smaug 2018-04-24 11:57:40 -04:00
Kris Maglione
33ff77dabf Bug 1363925: Part 3 - Move more install logic from XPIProvider to XPIInstall. r=aswan
MozReview-Commit-ID: 87PXV43Lpn9

--HG--
extra : rebase_source : dfc38cfb001455243449d7fe0da7f9294e88c8c2
extra : histedit_source : 6e561d0601dcca8da34c926b72e65a126bd40572
2018-04-21 18:29:33 -07:00
Gijs Kruitbosch
c4a85a5a4d Bug 1456171 - make getPluginBlocklistState API asynchronous, r=kmag
MozReview-Commit-ID: KcDWtkdkNKs

--HG--
extra : rebase_source : 3c96317565b0efecc796ba4429324aa6c2945a69
2018-04-23 17:11:34 +01:00
Nathan Froyd
2d58b9d7fb Bug 1455178 - avoid static constructors for atom initialization; r=njn
For reasons unknown, if you give MSVC:

// Foo.h
struct Foo
{
  ...
};

extern const Foo gFoo;

// Foo.cpp, which necessarily includes Foo.h.
extern constexpr Foo gFoo = {
};

MSVC will create a static initializer for gFoo and place it in the
read/write data section, rather than the read-only data section.
Removing the `extern const` declaration seems to be enough to make this
problem go away.  We need to adjust the declaration of other variables
to compensate for the non-visibility of gFoo in the header file.
2018-04-22 16:53:22 -04:00
Gabriele Svelto
902c8cde47 Bug 1451002 - Send ongoing memory pressure notifications when a low-memory condition persists for a long time; r=njn
--HG--
extra : rebase_source : d98800a5116e13dfc28e546cbf26beb0d6090147
2018-04-18 17:07:39 +02:00
Aaron Klotz
5317435ec0 Bug 1432653: Refactor the DLL interceptor and parameterize its memory operations; r=handyman
MozReview-Commit-ID: EYxVsQ1kicy

--HG--
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherBase.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherDetour.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherNopSpace.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/nsWindowsDllInterceptor.h
rename : toolkit/xre/test/win/TestDllInterceptor.cpp => mozglue/tests/interceptor/TestDllInterceptor.cpp
extra : amend_source : 84a7590b40a649f7321eb05feca4f9256ecc5d22
2018-04-09 13:37:52 -06:00
Jorg K
7559921ade Bug 1455221 - Part 3: Increase size of table used by perfect hash function from 256 to 512. r=nika 2018-04-20 10:13:00 +03:00
Nika Layzell
7653728855 Bug 1455221 - Part 2: Assert if there is a duplicated UUID or name in xptcodegen.py, r=mccr8 2018-04-19 10:28:00 +03:00
Kris Maglione
903e86e865 Bug 1455458: De-XPIDLify the blocklist service. r=gijs
Going through XPConnect for JS-to-JS access in the blocklist service adds no
benefit, but does add a lot of overhead and maintenance burden.

MozReview-Commit-ID: Lf1mDK0b0B0

--HG--
extra : rebase_source : 410ed3fcf999d7c7775ef4926c89f67d9e342da8
2018-04-19 16:01:24 -07:00
Dorel Luca
644bf34f8b Backed out 8 changesets (bug 1453011, bug 1452981, bug 1146316) For xpcshell and mochitest failures on multiple files. CLOSED TREE
Backed out changeset 033299f27339 (bug 1453011)
Backed out changeset 4464997475c1 (bug 1453011)
Backed out changeset cae243fb2a3c (bug 1453011)
Backed out changeset adf56a83131b (bug 1453011)
Backed out changeset 80abe3305b24 (bug 1452981)
Backed out changeset 02178545f255 (bug 1452981)
Backed out changeset 719f7596c208 (bug 1146316)
Backed out changeset 1316c78daeb6 (bug 1146316)
2018-04-20 21:40:24 +03:00
Peter Van der Beken
21bd76217a Bug 1453011 - Remove CONTENT_NODE. r=bz.
--HG--
extra : rebase_source : fb900637133ceaf55aa13c7829f168fdd7b80d7d
2018-04-16 12:58:55 +02:00
Peter Van der Beken
79663afa7d Bug 1452981 - Remove qsObjectHelper. r=bz.
--HG--
extra : rebase_source : 931b915a05d026d826ceb5ec919c3909f9bae053
2018-03-01 09:01:00 +01:00
Matt Woodrow
a6e9002c24 Bug 1406727 - Improve diagnostics in BuildDisplayList. r=froydnj
MozReview-Commit-ID: Ctb7HFxgPac

--HG--
extra : rebase_source : 696683a6a905e0f4862e0a7f8a9708c487e5248b
2018-02-06 12:21:31 +13:00
Nathan Froyd
9362ad6e83 Bug 1454052 - make MakeScopeExit a MOZ_MUST_USE function; r=gerald
Otherwise, one can do thinkos like:

  MakeScopeExit(...);

and the scope exiting function will execute much earlier than the
intended:

  auto guard = MakeScopeExit(...);
2018-04-18 12:14:18 -04:00
Nika Layzell
e5f31c03d8 Bug 1444991 - Part 4: Handle DOM Objects in XPConnect, r=mccr8
This patch goes through the XPConnect conversion methods, and adds cases for
T_DOMOBJECT which call the Wrap, Unwrap, and Cleanup methods from the
nsXPTDOMObjectInfo objects created in the last part.

For consistency with normal interface pointers, and because it wasn't too
complex, I also added support for including T_DOMOBJECTs in XPCOM arrays.
2018-04-17 19:21:03 -04:00
Nika Layzell
697573d613 Bug 1444991 - Part 3: Generate DOMObject info for xptinfo, r=mccr8
Unlike the other lists in xptinfo, this list contains relocations. Each
DOMObject has 3 functions generated for it, `Wrap`, `Unwrap` and `Cleanup`,
which perform the necessary actions. These are stored as function pointers.

Wrap gets the DOMObject wrapper using the DOM binding code, Unwrap gets the
underlying C++ object, and addrefs it (as XPCOM methods return native types
via getter_AddRefs), and Cleanup releases a reference to the underlying
C++ object, for when the unwrapped object is used as a temporary during a call.

To generate the code, we need to have the declaration of the native C++ type
in scope, so we also emit #include-s for the headerFiles.
2018-04-17 19:21:02 -04:00
Nika Layzell
6969209b41 Bug 1444991 - Part 2: Parse webidl productions in xpidl, r=mccr8
They are parsed into a WebIDL object, and lowered into C++, Rust, and XPT.

For C++ code, we generate a correctly namespaced forward declaration. In Rust,
the types are exposed as `*const c_void`, as we don't have WebIDL type
information there.

The XPT code generator needs to know the header filename in order to perform
correct codegen, so we also get that information.
2018-04-17 19:21:00 -04:00
Nika Layzell
be8b24333a Bug 1444991 - Part 1: Read webidl's Bindings.conf, and pass it into xpidl, r=mccr8
This information is read in order to handle correctly selecting the native
type and header files for WebIDL types.
2018-04-17 19:20:58 -04:00
Nika Layzell
14da321a67 Bug 1444745 - Part 5: Update consumers of nsIInterfaceInfo to use the nsXPTInterfaceInfo directly, r=mccr8
Due to the decision to keep the old API on nsXPTInterfaceInfo in part 4, this is
a fairly straightforward patch.

1. I had to change a couple of consumers of `IsRetval()` due to the movement of
that flag.
2. I changed all code which held a nsIInterfaceInfo to hold an `const
nsXPTInterfaceInfo*` instead.
3. I changed code which used the nsIInterfaceInfoManager to instead call the
static methods on nsXPTInterfaceInfo.
2018-04-17 19:20:56 -04:00
Nika Layzell
04547a4a00 Bug 1444745 - Part 4: Rewrite xptinfo, and write a new xptcodegen.py to generate the required datastructures, r=mccr8
This patch contains the meat of the changes here. The following summarize the changes:
1. xptinfo.h is rewritten to expose the new interface for reading the XPT data,

The nsXPTInterfaceInfo object exposes methods with the same signatures as
the methods on nsIInterfaceInfo, to make converting code which used
nsIInterfaceInfo as easy as possible, even when those methods don't have
signatures which make a ton of sense anymore. There are also a few methods
which are unnecessary (they return `true` or similar), which should be
removed over time.

Members of the data structures are made private in order to prevent reading
them directly. Code should instead call the getter methods. This should make
it easier to change their memory representation in the future. Constructing
these structs is made possible by making the structs `friend class` with the
XPTConstruct class, which is implemented by the code generator, and is able
to access the private fields.

In addition, rather than using integers with flag constants, I opted for
using C++ bitfields to store individual flags, as I found it made it easier
to both write the code generator, and reason about the layouts of the types.

I was able to shave a byte off of each nsXPTParamInfo (4 bytes -> 3 bytes)
by shoving the flags into spare bits in the nsXPTType. Unfortunately there
was not enough room for the retval flag. Fortunately, we already depend in
our code on the retval parameter being the last parameter, so I worked
around this by removing the retval flag and instead having a `hasretval`
flag on the method itself.

2. An xptinfo.cpp file is added for out-of-line definitions of more complex
methods, and the internal implementation details of the perfect hash.

Notable is the handling of xptshim interfaces. As the type is uniform, a
flag is checked when trying to read constant information, and a different
table with pointers into webidl data structures is checked when the type is
determined to be a shim.

Ideally we could remove this once we remove the remaining consumers of the
existing shim interfaces.

3. A python code generator which takes in the json XPT files generated in the
previous part, and emits a xptdata.cpp file with the data structures. I did
my best to heavily comment the code.

This code uses the friend class trick to construct the private fields of the
structs, and avoid a dependency on the ordering of fields in xptinfo.h.

The sInterfaces array's order is determined by a generated perfect hash
which is also written into the binary. This should allow for fast lookups by
IID or name of interfaces in memory. The hash function used for the perfect
hash is a simple FNV hash, as they're pretty fast.

For perfect hashing of names, another table is created which contains
indexes into the sInterfaces table. Lookup by name is less common, and this
form of lookup should still be very fast.

4. The necessary Makefiles are updated to use the new code generator, and
generate the file correctly.
2018-04-17 19:20:55 -04:00
Nika Layzell
95b7d44e5d Bug 1444745 - Part 3: Replace the XPT file format with a JSON based one, r=mccr8
This patch adds a python script based on the old typelib.py script which takes
in a parsed XPIDL file, and generates a json-based XPT file to use as a build
intermediate. I did my best to keep the generated format simple.
2018-04-17 19:20:53 -04:00
Nika Layzell
c29896177a Bug 1444745 - Part 2: Add the xptshim and xptshimfile attributes to xpidl, r=mccr8
In the previous patch, one of the files which was deleted is ShimInterfaceInfo.
This is an implementor of nsIInterfaceInfo which exists for legacy reasons, in
order to allow Components.interfaces.nsIDOM* to have the correct constants and
IIDs associated with them.

As that file was deleted, this information now has to be stored in the typelib.
To do this, the information is moved to the xptshim and xptshimfile attributes
on the relevant xpcom interfaces.

xptshim(...) means that this xpcom interface is a shim for the WebIDL interface
with the specified name.

xptshimfile(...) is for use when the webidl interface is declared in another
interface's .webidl file, (in our case, MessageManager.webidl). It contains the
name of the parent binding, such that we can #include the correct file in our
generated code.

This patch does not add the code which uses these changes, only the parsing
logic.
2018-04-17 19:20:51 -04:00
Nika Layzell
f5f86c989e Bug 1444745 - Part 1: Clear out xptinfo and typelib to make way for the this patch, r=mccr8
Unfortunately, I wasn't able to figure out a way to make firefox build & run in
the intermediate stages of these commits. Because of this, I am going to just
delete most of the code which I am deleting in the first patch, as I figure that
those are somewhat uninteresting changes, and then make the other changes in the
following patches.

In total, the following things are deleted:
1. All of xpcom/typelib, except for `xpt/tools` - this directory is being
subsumed entirely into xpcom/reflect/xptinfo.
2. Most of the code in xpcom/reflect/xptinfo, it is being rewritten to avoid
allocating and contain all of the necessary data structures.
3. idl-parser's typelib.py XPT generator, as it will be replaced.
4. Most includes of files which have been deleted.

NOTE: xpcom/typelib/xpt/tools/xpt.py was not removed, as it is used by bundling
code & bundling tests, which we don't want to remove yet.
2018-04-17 19:20:50 -04:00
Csoregi Natalia
12a8bddd95 Merge inbound to mozilla-central. a=merge 2018-04-18 00:52:25 +03:00
Nathan Froyd
32dc58b2ba Bug 1451255 - make nsTraceRefcnt handle multibyte characters in log files; r=mccr8
...on Windows, at least.  Apparently if you have environment variables
set that contain multibyte characters, and ask for them with getenv, you
get garbage.  Or perhaps you get something sensible, but then passing it
to fopen produces garbage.  Either way, the most reasonable way to
handle this is to use the Windows wide-character APIs all over.
2018-04-17 10:13:42 -04:00
Nicholas Nethercote
59e46f2358 Bug 1451535 - Remove NS_ConstExprIsAscii() functions. r=froydnj 2018-04-17 20:03:52 +09:00