Commit Graph

777 Commits

Author SHA1 Message Date
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Gabriele Svelto
566f669d07 Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12728

--HG--
extra : moz-landing-system : lando
2018-11-26 14:49:44 +00:00
Jeff Walden
7dd0d06d8c Bug 1485800 - Rename SourceBufferHolder to SourceText, and add a <typename Unit> template parameter to it so it can hold putative UTF-8 or UTF-16 source text. r=tcampbell, r=fitzgen
--HG--
rename : js/public/SourceBufferHolder.h => js/public/SourceText.h
extra : rebase_source : 34df669c2481eaccd6845f53c5ecf656b636f895
2018-11-08 18:42:48 -08:00
Jeff Walden
f2196f8c8f Bug 1503086 - Initialize all SourceBufferHolders with a fallible function that in all cases assumes ownership of given-ownership data. r=tcampbell, r=bz, r=mrbkap on some finicky worker code lightly touched here
--HG--
extra : rebase_source : 94b1a13dc03a7f1a5d07a2c665fdc0cde162d411
2018-10-23 12:27:16 -07:00
Kris Maglione
f5e4ac7e08 Bug 1356412: Part 1 - Remove subscript loader path mangling. r=mccr8
This was only ever useful before we had compartment-based security isolation.
Now it is just a pervasive nuisance.

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

--HG--
extra : rebase_source : 9af37bbd959b2db3d7a6c5ac723a474c47676f79
2018-11-02 14:45:12 -07: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
a3164a8def Bug 1492584, part 2 - Make mozJSComponentLoader::sSelf a strong reference. r=kmag
The JS component loader is an XPCOM component, so it is held alive by
the component manager. In order to be able to make it no longer be an
XPCOM component, we have to keep it alive some other way. I decided to
simply keep it alive as long as XPConnect itself is alive.

Depends on D9583

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

--HG--
extra : moz-landing-system : lando
2018-10-23 23:19:34 +00:00
Andrew McCreight
c87fb5b0a9 Bug 1499865 - Make loadedModules and loadedComponents into array attributes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D9561

--HG--
extra : moz-landing-system : lando
2018-10-23 23:28:44 +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
4c274219f8 Bug 1497707, part 1 - Get rid of xpcIJSModuleLoader. r=kmag
This interface is only used for a few testing functions. Just move
them to Cu.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:16 +00: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
7c9511ad37 Bug 1497707, part 1 - Get rid of xpcIJSModuleLoader r=kmag
This interface is only used for a few testing functions. Just move
them to Cu.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 20:45:41 +00:00
Kris Maglione
c0ccca38cd Bug 1455637: Use RefPtr rather than nsCOMPtr to avoid data race. r=mccr8
getter_AddRefs for nsCOMPtr does an AssertNoQueryNeeded check when its
temporary is destroyed. For the mReaderThread, this happens at a time when
control of the member variable has been handed over to the reader thread,
which causes a data race in the query needed check when the reader thread
shuts itself down and clears the member.

Switching to RefPtr solves this problem by removing the unnecessary check.

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

--HG--
extra : rebase_source : 0532d152b6be57451e5729bf6b72e2056f3ed300
2018-10-09 13:22:28 -07:00
Lina Cambridge
a21adc384b Bug 1495723 - Add support for importing extra symbols to defineLazyGlobalGetters. r=kmag
Some global imports, like `fetch`, expose multiple symbols. This patch
ensures we can define lazy getters for those symbols, by mapping the
extra symbol name to the main import name.

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:10:04 +00:00
Eric Rahm
e5d83b78fd Bug 1494827 - Add USS telemetry for content process startup. r=kmag
This adds telemetry for content processes' USS memory usage on startup.

--HG--
extra : rebase_source : 199a74448a31a5ad31216ca44e5822358f15c2f2
2018-09-27 18:13:05 -07:00
Jason Orendorff
aaf539046b Bug 1491939 - Part 3: Centralize configuration of JS realm options from prefs. r=baku
Depends on D6554

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

--HG--
extra : moz-landing-system : lando
2018-09-25 14:11:13 +00:00
Kris Maglione
dd46a38a66 Bug 1486147: Part 3 - Remove unused XPCOMUtils.IterStringEnumerator method. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4271

--HG--
extra : rebase_source : c2e91a04a0e0999c376f9d747f7afeae4f2a9d37
extra : histedit_source : 72af67a0e2667ba782e102f44ce5a0f0a62804ee
2018-08-24 16:23:03 -07:00
Kris Maglione
1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Jeff Walden
8f587a8aa5 Bug 1491137 - Split the JS::Compile that takes const char*/size_t into JS::CompileUtf8 and JS::CompileLatin1 that assert |options.utf8| has consistent value, and a JS::Compile that delegates to one of those as appropriate -- a step toward having entirely separate compilation functions that do direct parsing of UTF-8 without inflating first. r=jandem
--HG--
extra : rebase_source : 4fbc10a7e5e221da4c68c02dc155d925e7a7367d
2018-09-12 20:48:44 -07:00
Jan de Mooij
99b8247af2 Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/loader. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D5651

--HG--
extra : moz-landing-system : lando
2018-09-12 18:14:49 +00:00
Daniel Varga
1539df295b Merge mozilla-inbound to mozilla-central a=merge 2018-09-08 06:53:43 +03:00
Mike Hommey
117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Jeff Walden
327a90245e Bug 1487136 - Make OwningCompileOptions::setFile(JSContext*, const char*) MOZ_MUST_USE. r=kmag on fixing the one user requiring any changes, r=me on the obviously-justified attribute-addition
--HG--
extra : rebase_source : 53f22d0cb6f68fcdf93bd9cbf7e5e3b559a50611
2018-08-28 14:54:20 -05:00
André Bargull
ed962c63e5 Bug 1485066 - Part 8: Rename JS_EncodeString to JS_EncodeStringToLatin1. r=Waldo 2018-09-05 06:05:03 -07:00
André Bargull
e4d1d98f88 Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo 2018-09-05 02:25:42 -07:00
Cosmin Sabou
1f0a42def4 Backed out 14 changesets (bug 1485066) for build bustages on MessageManagerFuzzer. CLOSED TREE
Backed out changeset e40f67f15bf1 (bug 1485066)
Backed out changeset f09bc4d5fdcc (bug 1485066)
Backed out changeset 939e27aa2d59 (bug 1485066)
Backed out changeset d50fcf82556c (bug 1485066)
Backed out changeset 5cbc0ae0117a (bug 1485066)
Backed out changeset 09b5382e0baf (bug 1485066)
Backed out changeset 6676e8fedcb3 (bug 1485066)
Backed out changeset 28e7e61c11ec (bug 1485066)
Backed out changeset b08b0cfc1dbe (bug 1485066)
Backed out changeset 8defc9eabfac (bug 1485066)
Backed out changeset bf167b0a3af3 (bug 1485066)
Backed out changeset 4f89260d5e30 (bug 1485066)
Backed out changeset c22fc17c9d87 (bug 1485066)
Backed out changeset d35bb63dbc1d (bug 1485066)
2018-09-05 15:54:03 +03:00
André Bargull
89416b7fd4 Bug 1485066 - Part 8: Rename JS_EncodeString to JS_EncodeStringToLatin1. r=Waldo 2018-09-05 02:26:49 -07:00
André Bargull
775b7277cc Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo 2018-09-05 02:25:42 -07:00
Nicholas Nethercote
2fcd08a173 Bug 1486690 - Rename NS_str{,}dup and remove unnecessary checks after calls to them. r=glandium
The 'x' prefix makes it clearer that these are infallible.

A couple of nsJSID methods are now also infallible.

--HG--
extra : rebase_source : fcce44a00212d6d341afbf3827b31bd4f7355ad5
2018-08-28 15:58:54 +10:00
Jeff Walden
64fceacad0 Bug 1486577 - Don't #include "js/CompilationAndEvaluation.h" in jsapi.h, minimizing the scope of that header and reducing translation-unit size of anything that needs JSAPI but doesn't need to compile/evaluate JavaScript. r=jandem
--HG--
extra : rebase_source : cd9a8becc15477bc5e24408159d4f061ec81c8b2
2018-08-24 22:51:49 -05:00
Jeff Walden
4bdf4a3614 Bug 1486577 - Don't #include js/SourceBufferHolder.h in jsapi.h, and instead require users to do so -- a minor translation-unit size improvement for anyone who never has to use SourceBufferHolder other than by reference. r=jandem
--HG--
extra : rebase_source : df47aba0c7dac3fe80ab6ea1b9a34c7acc54850d
2018-08-24 21:01:58 -05:00
Kris Maglione
93703861d1 Bug 1486182: Part 3 - Remove unused XPCOMUtils.enumerateCategoryEntries method. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D4280

--HG--
extra : rebase_source : 6e09e6c46cee8ebe0e942f7135408a5b075066d1
2018-08-24 17:20:50 -07:00
Kris Maglione
b7962a2385 Bug 1484496: Part 6 - Remove unused XPCOMUtils.IterSimpleEnumerator method. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3734

--HG--
extra : rebase_source : 54c648602e8384ac78dc28b02a9bdc33c2dd9a35
extra : histedit_source : 3743ce95426177a42ee216659e4a5c7ee0e0adbc
2018-08-18 18:45:57 -07:00
Kris Maglione
3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Jeff Walden
ffd93ba761 Bug 1033916 - Move JSAutoByteString out of jsapi.h into js/public/AutoByteString.h, incidentally breaking the jsfriendapi.h -> jsapi.h dependency. r=jandem
--HG--
extra : rebase_source : d85baf9b28e632db5669aa3d056cc9744686f5c8
2018-08-20 07:46:08 -07:00
Kris Maglione
31bde826fc Bug 1484466: Part 5 - Use a single QueryInterface method for all nsIFactory instances. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3712

--HG--
extra : rebase_source : d63dc47aed6ab8c35b8352437bdde6c9f3fa1b6d
2018-08-18 12:55:21 -07:00
Kris Maglione
72a0557c23 Bug 1484466: Part 4 - Remove unnecessary lockFactory stub method implementation. r=mccr8
XPConnect will handle dispatching an appropriate error for these calls.

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

--HG--
extra : rebase_source : 659a429248aea6bb70d76f0ba24241ae64056772
2018-08-18 12:53:47 -07:00
Kris Maglione
3dc726f5c5 Bug 1484466: Part 3b - Remove unused XPCOMUtils.generateQI method. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3710

--HG--
extra : rebase_source : 07057848d1dd8ca674d45f7dc975746c7a3c3f74
2018-08-18 12:45:31 -07:00
Kris Maglione
356dd0de4a Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3709

--HG--
extra : rebase_source : 650545d3e58ab92821a9ea2097793cca5996d5b3
2018-08-18 12:44:57 -07:00
Kris Maglione
312a132d3c Bug 1484466: Part 2b - Remove unused XPCOMUtils.generateCI method. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3708

--HG--
extra : rebase_source : 6d4c844d4b3b224caef01cb92f3ee27e6999ca4d
2018-08-18 12:39:32 -07:00
Kris Maglione
880dd37f97 Bug 1484466: Part 1 - Remove unused XPCOMUtils.importRelative method. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3706

--HG--
extra : rebase_source : bea0fcbfc3398f79f2b2655aea81f6181eeca856
2018-08-18 12:36:03 -07:00
Gabriele Svelto
15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Jan de Mooij
6b5c6b10aa Bug 1481772 - Remove unnecessary JSAutoRealm in mozJSComponentLoader::ImportInto. r=kmag 2018-08-09 10:48:29 +02:00
Jan de Mooij
21af7a61b0 Bug 1481467 part 1 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in mozJSComponentLoader::ImportInto. r=kmag
The targetVal argument is always same-compartment with the JSContext, so we only need to use JSAutoRealm in the FindTargetObject case.
2018-08-08 15:07:41 +02:00
Jan de Mooij
51c1609621 Bug 1479363 part 6 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in js/xpconnect/loader. r=kmag 2018-08-02 08:49:10 +02:00
Jon Coppeard
827b83bae3 Bug 1475228 - Allow construction of a SourceBufferHolder from a UniquePtr r=jandem r=kmag 2018-07-17 14:30:23 +01:00
Jon Coppeard
4ff436874c Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01:00
Jon Coppeard
ec2af16383 Bug 1475228 - Make synchronous compile APIs take SourceBufferHolders exclusively r=jandem r=fitzgen 2018-07-17 14:30:22 +01:00
Gijs Kruitbosch
dcbec7c8b6 Bug 1478404 - remove _xpcom_categories annotations as they're dead code, r=florian
Support for the _xpcom_categories property was removed in Bug 568691,
but we left a bunch of consumers behind, and it's been cargo-culted a bit more.
We should remove the remaining remnants.

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

--HG--
extra : moz-landing-system : lando
2018-07-31 17:39:25 +00:00