Commit Graph

1309 Commits

Author SHA1 Message Date
Daosheng Mu
e9931800c1 Bug 1498625 - Part 2: Switch VR process to TYPE_MOZILLA_CHILD message loop type. r=froydnj,handyman
Differential Revision: https://phabricator.services.mozilla.com/D10643

--HG--
extra : moz-landing-system : lando
2018-11-05 21:28:38 +00:00
arno renevier
346fad4655 Bug 497136 - Replace NS_ERROR_SERVICE_NOT_FOUND with NS_ERROR_SERVICE_NOT_AVAILABLE. r=benjamin sr=dveditz
--HG--
extra : source : 532102f7d61ac5ca9a48c4e2c7257b3162655b50
2018-10-31 19:56:24 +09:00
Andrew McCreight
9978e851df Bug 1492584, part 3 - Remove JS component loader registration. r=kmag
After the previous patches, we no longer rely on the component manager
to incidentally start up XPConnect when we load the JS loader service
or to hold the JS component loader alive, so the do_GetService() call
for the JS loader in XPCOMInit.cpp can be removed. After that is done,
the JS loader is no longer used as an XPCOM component, so all of the
boilerplate for that can be removed.

Depends on D8757

Differential Revision: https://phabricator.services.mozilla.com/D8758

--HG--
extra : moz-landing-system : lando
2018-10-23 23:20:38 +00:00
Andrew McCreight
681cefeb09 Bug 1492584, part 1 - Eagerly initialize nsLayoutModule in the component manager. r=froydnj
nsLayoutModule must be initialized in order to call into JS, but I
don't want to have to rely on calling a service in that
module. Instead, always initialize the module very early in component
manager initialization. This also makes initialization more
consistent, so things like errors in manifests won't affect when it
happens, which can result in different behavior in different builds.

I also made nsLayoutModule initialization infallible, because I can't
imagine that we can do much that is useful without it.

Another change I made is that gInitialized is set to true even in a
GPU process. This simplifies checking whether initialization has
happened already when we start up the layout module.

Differential Revision: https://phabricator.services.mozilla.com/D9583

--HG--
extra : moz-landing-system : lando
2018-10-24 16:10:29 +00:00
Andrew McCreight
0ee66a7f4f Bug 1497707, part 5 - Inline mozilla::ModuleLoader into mozJSComponentLoader. r=froydnj
Now that the XPCOM component loader infrastructure has stopped
pretending to support other file extensions, this intermediate
interface is no longer needed.

Depends on D8171

Differential Revision: https://phabricator.services.mozilla.com/D8172

--HG--
extra : moz-landing-system : lando
2018-10-23 00:46:49 +00:00
Andrew McCreight
f7cab62df4 Bug 1497707, part 4 - Only support loading JS files in the component manager. r=froydnj
JS is the only file extension actually supported, and there are a few
layers of cruft that can be eliminated if we specialize it.

This eliminates one XPCOM registration of the JS component loader.

Depends on D8170

Differential Revision: https://phabricator.services.mozilla.com/D8171

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:38 +00:00
Andrew McCreight
678b7ca2b3 Bug 1497707, part 3 - Remove various unused things from nsComponentManager. r=froydnj
Depends on D8169

Differential Revision: https://phabricator.services.mozilla.com/D8170

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:31 +00:00
Andrew McCreight
5c342e70f3 Bug 1497707, part 2 - The second argument to nsComponentManagerImpl::RegisterModule is always null. r=froydnj
This allows some code to be deleted, including a KnownModule ctor.

Depends on D8168

Differential Revision: https://phabricator.services.mozilla.com/D8169

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:24 +00:00
ffxbld
2bf422025a Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-10-22 08:50:03 -07:00
Dorel Luca
88bfc3786c Backed out 5 changesets (bug 1497707) for android mass failures. CLOSED TREE
Backed out changeset bb1b80139e37 (bug 1497707)
Backed out changeset 11c813f192e2 (bug 1497707)
Backed out changeset 32595f9e73d3 (bug 1497707)
Backed out changeset f37f2d39ec9c (bug 1497707)
Backed out changeset 80bf9ddf5bed (bug 1497707)

--HG--
extra : rebase_source : 598b7732d9b994dfeb63c417841a4b9516ecdf19
2018-10-18 00:35:39 +03:00
Andrew McCreight
114c3035be Bug 1497707, part 5 - Inline mozilla::ModuleLoader into mozJSComponentLoader r=froydnj
Now that the XPCOM component loader infrastructure has stopped
pretending to support other file extensions, this intermediate
interface is no longer needed.

Depends on D8171

Differential Revision: https://phabricator.services.mozilla.com/D8172

--HG--
extra : moz-landing-system : lando
2018-10-17 20:45:43 +00:00
Andrew McCreight
eefa2cf094 Bug 1497707, part 4 - Only support loading JS files in the component manager r=froydnj
JS is the only file extension actually supported, and there are a few
layers of cruft that can be eliminated if we specialize it.

This eliminates one XPCOM registration of the JS component loader.

Depends on D8170

Differential Revision: https://phabricator.services.mozilla.com/D8171

--HG--
extra : moz-landing-system : lando
2018-10-17 20:45:43 +00:00
Andrew McCreight
be89d903f8 Bug 1497707, part 3 - Remove various unused things from nsComponentManager r=froydnj
Depends on D8169

Differential Revision: https://phabricator.services.mozilla.com/D8170

--HG--
extra : moz-landing-system : lando
2018-10-17 20:45:42 +00:00
Andrew McCreight
9f1dcc8dca Bug 1497707, part 2 - The second argument to nsComponentManagerImpl::RegisterModule is always null r=froydnj
This allows some code to be deleted, including a KnownModule ctor.

Depends on D8168

Differential Revision: https://phabricator.services.mozilla.com/D8169

--HG--
extra : moz-landing-system : lando
2018-10-17 20:45:42 +00:00
Sylvestre Ledru
dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

Differential Revision: https://phabricator.services.mozilla.com/D8569

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Kris Maglione
c7df4b83d7 Bug 1486147: Follow-up: Fix missing QueryInterface entries. r=bustage
--HG--
extra : rebase_source : 4ab19b5145117f9c9aef87d8d59ad7ff923e299d
2018-09-19 17:34:10 -07:00
Kris Maglione
31cf107646 Bug 1486147: Part 1 - Add JS iterator support to nsIStringEnumerator. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4269

--HG--
extra : rebase_source : 5fe9d4c7717d65e1bc8d45bdd89bcc5384c6d0ee
extra : histedit_source : e8f5606a192f13524996faf2e179d2c2e58c933f%2C725c8f145a1f4d34f84e6818b61ec5b955862e70
2018-08-24 16:21:33 -07:00
Tom Ritter
26dbd4d795 Bug 1481633 Resolve kPStaticModules undefined symbols in MinGW Clang r=glandium
clang can handle MSVC-like codepaths generally, so we want to use those
when building with clang for Windows. So we switch _MSC_VER over to _WIN32
to pick up those codepaths when compiling for Windows with clang.

Additionally, we relax the ordering of sections for the same scenario.

Note that we do need to tell clang to use -fms-extensions with the MSVC code,
we do that in the mingw clang build job patch.

Differential Revision: https://phabricator.services.mozilla.com/D3526

--HG--
extra : moz-landing-system : lando
2018-09-11 03:20:06 +00:00
ffxbld
ebe4d2e4d6 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-09-04 11:15:27 -07:00
Kris Maglione
92b452df94 Bug 1486182: Part 1 - Include both category names and values in category enumerator. r=froydnj
Nearly all of the consumers of category enumerators require the entry value,
either along with or instead of the name. Including both by default simplifies
things considerably for most consumers, and allows us to remove the XPCOMUtils
wrapper that JS callers typically use to enumerate category entries.

Differential Revision: https://phabricator.services.mozilla.com/D4277

--HG--
extra : rebase_source : 1efe0434e150f08bb9f4d8a4c6f6e993efebf8d8
2018-08-24 22:22:07 -07:00
Kris Maglione
2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

Differential Revision: https://phabricator.services.mozilla.com/D3728

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Kris Maglione
65c28aa0ad Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.

This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.

Differential Revision: https://phabricator.services.mozilla.com/D3725

--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
2018-08-18 14:22:47 -07:00
Kris Maglione
c1225b0967 Bug 1483865: Make NotStackAllocated assertion a bit safer. r=froydnj
This assertion was always meant to be a best-effort thing to catch obvious
errors, but the cases where the assumptions it makes fail have been growing. I
could remove it entirely, but I'd be happier keeping at least some basic
sanity checks.

This compromise continues allowing any address below the first argument
pointer, and extends the assertion to also allow anything more than 2KiB above
it. We could probably get away with stretching that to at least 4KiB, but 2
seems safer, and likely enough to catch the obvious cases.

Differential Revision: https://phabricator.services.mozilla.com/D3542

--HG--
extra : source : a5f51c76930c49160bf5e909301d8e7f1a83e379
extra : amend_source : e3decc44bfb4bed6696a394980c378dc033e1021
2018-08-16 11:35:50 -07:00
shindli
55b51772a4 Backed out changeset a5f51c76930c (bug 1483865) for bustages in builds/worker/workspace/build/src/xpcom/components/nsComponentManager.cpp on a CLOSED TREE 2018-08-22 21:31:45 +03:00
Kris Maglione
d07d6c1b5c Bug 1483865: Make NotStackAllocated assertion a bit safer. r=froydnj
This assertion was always meant to be a best-effort thing to catch obvious
errors, but the cases where the assumptions it makes fail have been growing. I
could remove it entirely, but I'd be happier keeping at least some basic
sanity checks.

This compromise continues allowing any address below the first argument
pointer, and extends the assertion to also allow anything more than 2KiB above
it. We could probably get away with stretching that to at least 4KiB, but 2
seems safer, and likely enough to catch the obvious cases.

Differential Revision: https://phabricator.services.mozilla.com/D3542

--HG--
extra : rebase_source : 9e17aa3d751f75deff67e40d223fda7aaa4f84f0
extra : amend_source : 86ada4dd01584defeaa5dcb093ad9a73b34f0318
2018-08-16 11:35:50 -07:00
Kris Maglione
725e4b5cf8 Bug 1479945: Part 5 - Remove the 'allowbootstrap' directive flag. r=froydnj
For all intents and purposes, this is now the same as the 'ischrome' flag.

MozReview-Commit-ID: 4z4SDs5M8zU

--HG--
extra : source : 2a5aa9de1fd9760a9245ecae815a6e02bb9eef42
2018-07-31 16:44:52 -07:00
Kris Maglione
f03c0288bf Bug 1479945: Part 4 - Remove unused isContract directive flag. r=froydnj
MozReview-Commit-ID: DLCiNb39gA8

--HG--
extra : source : 163276881d35942172fd18d8f2cd270fbab1de71
2018-07-31 16:38:49 -07:00
Kris Maglione
0ea583c3dd Bug 1479945: Part 3 - Remove the unused 'apponly' directive flag. r=froydnj
This is unused now that binary component support has been removed.

MozReview-Commit-ID: KHTsF4sSoZX

--HG--
extra : source : 20a1a11b4d0ba7010b36b952bb212f3c36e6aac3
2018-07-31 16:38:27 -07:00
Kris Maglione
1eef446312 Bug 1479945: Part 2 - Remove support for componentonly directive flag. r=froydnj
This serves no purpose now that legacy theme support has been removed.

MozReview-Commit-ID: BpLcQYfZtAZ

--HG--
extra : source : ca43bd11f43161f03d3e0dd6bd9b28d446bbe7e1
2018-07-31 16:33:08 -07:00
Kris Maglione
821801d125 Bug 1479945: Part 1 - Remove nominal support for binary-component directive. r=froydnj
MozReview-Commit-ID: LKF3A7EEY4J

--HG--
extra : source : 71700b368132dd0735d4b792d6dbc6e1365790d4
2018-07-31 16:31:31 -07:00
Cosmin Sabou
901f34bef4 Backed out 12 changesets (bug 1479309, bug 1479312, bug 1479313, bug 1479310, bug 1479235, bug 1479945, bug 1479241, bug 1479318) for causing a big performance regression on OS X. a=backout
Backed out changeset 915862a355e9 (bug 1479318)
Backed out changeset f150e62dcbbd (bug 1479241)
Backed out changeset a68daa762119 (bug 1479312)
Backed out changeset 2a5aa9de1fd9 (bug 1479945)
Backed out changeset 163276881d35 (bug 1479945)
Backed out changeset 20a1a11b4d0b (bug 1479945)
Backed out changeset ca43bd11f431 (bug 1479945)
Backed out changeset 71700b368132 (bug 1479945)
Backed out changeset f5d647fae973 (bug 1479313)
Backed out changeset 3583823171de (bug 1479310)
Backed out changeset 2d46e1fe3121 (bug 1479309)
Backed out changeset 8f9c9580f687 (bug 1479235)

--HG--
rename : browser/components/uitour/ContentUITour.jsm => browser/components/uitour/content-UITour.js
rename : dom/ipc/ManifestMessages.jsm => dom/ipc/manifestMessages.js
rename : toolkit/components/normandy/content/ShieldFrameListener.jsm => toolkit/components/normandy/content/shield-content-frame.js
rename : toolkit/components/normandy/shield-content-process.js => toolkit/components/normandy/content/shield-content-process.js
2018-08-07 17:30:52 +03:00
Kris Maglione
ad3026deb1 Bug 1479945: Part 5 - Remove the 'allowbootstrap' directive flag. r=froydnj
For all intents and purposes, this is now the same as the 'ischrome' flag.

MozReview-Commit-ID: 4z4SDs5M8zU

--HG--
extra : rebase_source : 7f6bd7e7ea9457920338439cfbe0ce2c191b4075
2018-07-31 16:44:52 -07:00
Kris Maglione
036cc0da8d Bug 1479945: Part 4 - Remove unused isContract directive flag. r=froydnj
MozReview-Commit-ID: DLCiNb39gA8

--HG--
extra : rebase_source : f0295229bf775ec0ae0536e3c95262c026727376
2018-07-31 16:38:49 -07:00
Kris Maglione
4a88c05507 Bug 1479945: Part 3 - Remove the unused 'apponly' directive flag. r=froydnj
This is unused now that binary component support has been removed.

MozReview-Commit-ID: KHTsF4sSoZX

--HG--
extra : rebase_source : 97a12aadbb4b726785b3bc565ac34854e6c04d8e
2018-07-31 16:38:27 -07:00
Kris Maglione
ea97c5634e Bug 1479945: Part 2 - Remove support for componentonly directive flag. r=froydnj
This serves no purpose now that legacy theme support has been removed.

MozReview-Commit-ID: BpLcQYfZtAZ

--HG--
extra : rebase_source : fe8e19517d12084631e3756a4a803fd6d3c4fc39
2018-07-31 16:33:08 -07:00
Kris Maglione
20edd8bca2 Bug 1479945: Part 1 - Remove nominal support for binary-component directive. r=froydnj
MozReview-Commit-ID: LKF3A7EEY4J

--HG--
extra : rebase_source : 66b5313e499e48e78acda94e275e600df6d8a38a
2018-07-31 16:31:31 -07:00
Kris Maglione
3869956f6e Bug 1477579: Follow-up: Also skip stack allocation assertion on Android. r=me DONTBUILD 2018-07-23 19:25:00 -07:00
Kris Maglione
7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Kris Maglione
83b3ac8f23 Bug 1477579: Part 2 - Use nsID* rather than nsID for mFactories hash keys. r=froydnj
Our factory registrations already require that we store nsID pointers, which
we generally handle by using pointers to static data, or arena allocating a
copy of a dynamic ID.

Since we already have viable pointers to these IDs, there's no reason to store
an entire second copy for our hash key. We can use the pointer, instead, which
saves 16 bytes per entry.

MozReview-Commit-ID: 6MgKrXRSHv4

--HG--
extra : source : 5fb0b7746a5d56563b471e3061ccca124ea45485
extra : absorb_source : 275f5d4dc2c02e3d0391ed16e8690dac1e601758
2018-07-21 19:09:25 -07:00
Kris Maglione
b8f2198d8c Bug 1477579: Part 1 - Use literal strings for statically registered contract ID keys. r=froydnj
Most of our components are static, and registered using literal C strings. For
those components, we currently use a nsDependentCString as a key when creating
a hash entry, which leads to an unnecessary duplication. Using literal
CStrings instead avoids the duplication.

MozReview-Commit-ID: 5DOUF8ZQMlh

--HG--
extra : source : 8359f8fe418419c50ab0ed93496e7445b570ba9f
extra : absorb_source : 2a33ae4e7e6d312adcea8ece2158f07a7050e01e
2018-07-22 10:54:56 -07:00
Brindusan Cristian
91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione
dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Kris Maglione
fde39b49d5 Bug 1477579: Part 2 - Use nsID* rather than nsID for mFactories hash keys. r=froydnj
Our factory registrations already require that we store nsID pointers, which
we generally handle by using pointers to static data, or arena allocating a
copy of a dynamic ID.

Since we already have viable pointers to these IDs, there's no reason to store
an entire second copy for our hash key. We can use the pointer, instead, which
saves 16 bytes per entry.

MozReview-Commit-ID: 6MgKrXRSHv4

--HG--
extra : rebase_source : 8d41a3fc5bc1ffe88af998bf9a0ba9ac3331a085
2018-07-21 19:09:25 -07:00
Kris Maglione
5302f88f24 Bug 1477579: Part 1 - Use literal strings for statically registered contract ID keys. r=froydnj
Most of our components are static, and registered using literal C strings. For
those components, we currently use a nsDependentCString as a key when creating
a hash entry, which leads to an unnecessary duplication. Using literal
CStrings instead avoids the duplication.

MozReview-Commit-ID: 5DOUF8ZQMlh

--HG--
extra : rebase_source : 57d151df64e29ee756f290e7eb047610b567ef04
2018-07-22 10:54:56 -07:00
Brian Hackett
4be736018d Bug 1207696 Part 4b - Make recording optional in mozilla mutexes and monitors, r=froydnj.
--HG--
extra : rebase_source : c00f199b38c6bdd47ed1793edf2ce90fbf2ff420
2018-07-21 14:22:54 +00:00
Brendan Dahl
133e16ecf4 Bug 1449791 - Remove platform support of overlays. r=bz
The following was removed:
- the main meat of the overlays and interface in XULDocument
- all overlay observers and forward references
- the notion of a master document
- XUL overlay provider
- manifest parsing of overlay attribute
- references to "overlay" atom
- restrictions on persistence (only need because of overlays)
- unused code that the above referenced

I also attempted to update comments that referenced overlays, but there is still
some work to be done here.


MozReview-Commit-ID: 8lrirzcgSuJ

--HG--
extra : rebase_source : 25b4e1d3fb2af6f02d894887271fd345c9c2083b
2018-03-28 18:20:04 -07:00
Mike Hommey
e44bfe7b57 Bug 1471685 - Work around MSVC linker adding padding during incremental builds. r=froydnj
--HG--
extra : rebase_source : 0e6f711d5f8517ca37d39c6f5a39cd0c0e3ec387
2018-06-28 15:53:25 +09:00
Mike Hommey
77a4c8515d Bug 1471132 - Make building a binary component a compile-time error. r=froydnj
Loading binary components is not supported since bug 1314955.

--HG--
extra : rebase_source : cc224240c4f7264ce946faed054f35019e559607
2018-06-26 16:18:14 +09:00
Mike Hommey
a6228a3f8a Bug 1471132 - Change how static xpcom components are initialized. r=froydnj
The sStaticModules list is, practically speaking, a copy of the list
of components we already have in libxul, augmented at runtime with
a few other components for tests (for gtest and xpcshell). We don't
actually need to keep that copy in memory. We can instead just use the
pointers in libxul directly to register them to the component manager,
and use a separate list, only for those extra components when they need
to be registered.

--HG--
extra : rebase_source : 1a32c95312d8577c99823adea8dbc0b022c286b2
2018-06-26 16:10:30 +09:00
Mike Hommey
0ddc27774e Bug 1471132 - Change how static xpcom components are linked. r=froydnj
Overall, this makes the whole setup less fragile, and make it work with
LTO in more situations.

--HG--
extra : rebase_source : de968c61dc4ef337fdc28745c202334ac41763cd
2018-06-26 14:40:51 +09:00