Commit Graph

6751 Commits

Author SHA1 Message Date
Bobby Holley
6cceb08363 Bug 1453057 - Make Xrays to Arguments objects work correctly. r=bzbarsky
MozReview-Commit-ID: XeWrs0cNL5

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

--HG--
extra : moz-landing-system : lando
2018-09-14 16:14:49 +00:00
Jan de Mooij
cb90b553cd Bug 1487032 - Store origin/site info in CompartmentPrivate. r=bholley
This will let us answer the following questions (in a performant way):

1) What's the compartment's origin? Necessary to implement compartment-per-origin.
2) What's the origin's site? Necessary for the new Wrap() algorithm.
3) Has any realm in the compartment set document.domain? Necessary for the new Wrap() algorithm.

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

--HG--
extra : moz-landing-system : lando
2018-09-11 09:01:14 +00:00
Daniel Varga
8eac4fe0d9 Merge mozilla-central to mozilla-inbound 2018-09-13 05:50:34 +03:00
Ehsan Akhgari
6d56a36888 Bug 1489793 - Part 1: Remove the XPCOM component registration for EditorSpellCheck; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D5371
2018-09-12 18:58:53 -04:00
Jan de Mooij
98b8b93e34 Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/wrappers. r=bholley
Depends on D5655

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

--HG--
extra : moz-landing-system : lando
2018-09-12 16:16:15 +00:00
Jan de Mooij
d51d2cab4b Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/src, part 4. r=kmag
Depends on D5654

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:19:51 +00:00
Jan de Mooij
d1f407756a Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/src, part 3. r=mccr8
Depends on D5653

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:18:29 +00:00
Jan de Mooij
489a289a73 Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/src, part 2. r=mccr8
Depends on D5652

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

--HG--
extra : moz-landing-system : lando
2018-09-12 17:42:42 +00:00
Jan de Mooij
57c43dd68c Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/src, part 1. r=bholley
Depends on D5651

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

--HG--
extra : moz-landing-system : lando
2018-09-12 16:19:06 +00: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
shindli
53d4f9c065 Backed out 2 changesets (bug 1489793) for failures in editor/spellchecker/tests/test_bug1219928.html
Backed out changeset 9d793ccd3fca (bug 1489793)
Backed out changeset 30219dab424e (bug 1489793)
2018-09-12 05:59:31 +03:00
Ehsan Akhgari
d536808f38 Bug 1489793 - Part 1: Remove the XPCOM component registration for EditorSpellCheck; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D5371
2018-09-11 19:17:46 -04:00
Dana Keeler
58da26473a bug 1411458 - add a test for bug 1411458 r=jcj
MozReview-Commit-ID: LrZN4DATEVP

--HG--
extra : rebase_source : f71a1278484a97e38a7c44fdf47cc0c690a0716b
2017-10-25 11:33:03 -07: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
Nicholas Nethercote
563171857f Bug 1488628 - Change nsIConsoleMessage.message to an AString. r=erahm
--HG--
extra : rebase_source : e43aec79e309936e17d475b8c50559767538c18d
2018-09-05 13:31:42 +10:00
Kris Maglione
3d172327cd Bug 1486249: Part 1 - Automatically convert JS iterators to nsISimpleEnumerators at XPConnect boundary. r=mccr8
This allows JS callers and C++ callers to both create and consumer iterators
in their preferred style, while still presenting the appropriate interfaces to
callers in the other language.

When a C++ caller requires an nsISimpleEnumerator from an XPCWrappedJS object,
if that class does not already have a QueryInterface method, it is assumed to
be a JS enumerator, and an appropriate wrapper is created. JS callers who wish
to implement nsISimpleEnumerator manually, or opt out of the automatic
conversions, may implement a QueryInterface method, which automatically opts
them out of this behavior.

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

--HG--
extra : rebase_source : eb61ee725a8c67e3e7f5b22d9aef9baa0cde1955
2018-08-25 18:18:10 -07:00
Kris Maglione
a4a6e3ecd9 Bug 1489532: Check for nsISimpleEnumerator wrapper before searching existing tear-offs. r=mccr8
When an XPC wrapped JS object returns an object from a property or function
which is expected to return a given interface, we create a wrapper for that
interface regardless of whether the object has a QueryInterface method which
claims to support it. For the nsISimpleEnumerator enumerator case, the check
for that existing wrapper comes before the check for the nsISimpleEnumerator
special casing, which breaks automatic conversion in those cases.

This patch moves that check just before the check for the existing wrapper,
and just after the nsIPropertyBag special casing, which has similar semantics.

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

--HG--
extra : rebase_source : 2201063455a2434cfa0c3c470f668fefa8528f4b
2018-09-07 15:17:56 -07: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
Ehsan Akhgari
6bbaf2cf8c Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 16:39:35 -04:00
shindli
2a86142e74 Backed out changeset d4ae1994c20c (bug 1489147) for bustages in JSDebugger.cpp on a CLOSED TREE 2018-09-06 22:12:44 +03:00
Ehsan Akhgari
bb7fcd9d69 Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 14:52:07 -04:00
André Bargull
38691a7464 Bug 1485066 - Part 11: Remove the unused |inBuf| argument from JS::FormatStackDump and change it to use Sprinter. r=Waldo 2018-09-05 03:01:23 -07: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
fbb9b6014c Bug 1485066 - Part 3: Replace calls to JS_EncodeString for string comparison with StringEqualsAscii. r=Waldo 2018-09-05 01:25:09 -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
ceccb59fda Bug 1485066 - Part 11: Remove the unused |inBuf| argument from JS::FormatStackDump and change it to use Sprinter. r=Waldo 2018-09-05 03:01:23 -07: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
76789014b1 Bug 1485066 - Part 3: Replace calls to JS_EncodeString for string comparison with StringEqualsAscii. r=Waldo 2018-09-05 01:25:09 -07:00
André Bargull
775b7277cc Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo 2018-09-05 02:25:42 -07:00
Jan de Mooij
cbb67627a3 Bug 722345 part 3 - Remove request API. r=luke
Differential Revision: https://phabricator.services.mozilla.com/D4424

--HG--
extra : rebase_source : 1842588c00dbc8fb4294ce5436cdb787190909b4
2018-08-28 09:53:30 +02:00
Bogdan Tara
ba6cae21b7 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-05 02:45:18 +03:00
Jan de Mooij
53f1370b5f Bug 1267297 - Use AutoEntryScript for script activity bookkeeping instead of the request machinery. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D4085

--HG--
extra : moz-landing-system : lando
2018-09-04 16:59:56 +00:00
Luke Wagner
109280bf02 Bug 1330661 - Baldr: make the BuildIdOp a process global (r=lth,mccr8)
--HG--
extra : rebase_source : 0388505583fb0b445f989e3a8b97ec861ed62499
2018-09-04 14:25:57 -05:00
Emilio Cobos Álvarez
75bea4ec60 Bug 1486623 - Skip less nodes when reporting memory, and report ShadowRoot's StyleSheets. r=bzbarsky
This moves all the node-specific reporting to nsIDocument.

OrphanReporter delegates all the reporting to that and then returns the sum of
all sizes, which is not ideal but was pre-existing.

Also, I moved the main mStyleSheets size reporting to DocumentOrShadowRoot for
it to be shared between document and ShadowRoot.

I'll add memory reporting for the computed stylesheet maps and such in the
ShadowRoot in a followup.

I went through all the XBL bindings, though it seems I could just use
GetBindingWithContent(), since according to:

  https://searchfox.org/mozilla-central/rev/55da592d85c2baf8d8818010c41d9738c97013d2/dom/xbl/nsXBLBinding.cpp#615

We don't allow multiple bindings to contribute anon content. Anyway it was the
same amount of code...

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

--HG--
extra : moz-landing-system : lando
2018-08-29 22:19:42 +00:00
Carl Corcoran
7da8e04c87 Bug 1467736: Add support for DllBlocklist_Shutdown;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D4544

--HG--
extra : moz-landing-system : lando
2018-08-29 18:49:49 +00:00
Nicholas Nethercote
fe34f19459 Bug 1486690 - Rename nsMemory::Clone() and remove unnecessary checks after it. r=glandium
The 'x' in the new name makes it clearer that it's infallible.

--HG--
extra : rebase_source : 51fd946c482befe8a8ca5bd88ecc967971f455da
2018-08-28 15:59:19 +10: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
Nicholas Nethercote
ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +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
b821d119a0 Bug 1486182: Part 2b - Update XPCOMUtils.enumerateCategoryEntries callers to use the category manager directly. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D4279

--HG--
extra : rebase_source : f57e09927871a23ed3c105325369e5c35ffd3d93
2018-08-24 17:05:41 -07:00
Kris Maglione
53f96aa226 Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=mossop
This makes it much easier to update existing consumers of
XPCOMUtils.enumerateCategoryEntries to use the category manager directly.

It also, unfortunately, requires updating existing category manager consumers
to use the Services getter in order to avoid ESLint errors.

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

--HG--
extra : rebase_source : fb9fd9b21db80af472ff6250a2e9a35e8d538147
2018-08-24 22:13:57 -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
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
83db11134f Bug 1484496: Part 1 - Add support for symbol properties to XPIDL. r=nika
This patch allows us to define methods or getters/setters for any of the
current set of well-known symbols. Those are defined by adding the [symbol]
attribute to a method:

  [symbol]
  Iterator iterator();

which causes the method to define a property with the well-known symbol which
matches its method name (Symbol.iterator, in this case).

Due to the implementation details of the XPIDL parser, this currently does not
support defining a non-symbol function with the same name as a symbol
function:

  [symbol]
  Iterator iterator();

  [binaryname(OtherIterator)]
  Thing iterator(in nsIDRef aIID);

throws for a duplicate method name, even though there is no actual conflict.

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

--HG--
extra : rebase_source : 1385e2da93113306730f7c087fe7385dbe668e91
extra : histedit_source : 3afd9fe38e7cbddc5576c2bd1673496dd623e489
2018-08-21 14:08:35 -07:00
Masatoshi Kimura
49ee57f31d Bug 1485028 - Fix warnings that are specific to clang-cl ASAN builds. r=dmajor
--HG--
extra : source : f0b577cc8b920352dfe297e7ec9cca58b1838c5d
2018-08-22 02:02:56 +09:00