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

18422 Коммитов

Автор SHA1 Сообщение Дата
Henri Sivonen 1a38ec4710 Bug 1486711 - Fill logically uninitialized parts of an XPCOM string's buffer with a marker byte in debug builds. r=froydnj
MozReview-Commit-ID: IwLikJpacAW

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

--HG--
extra : moz-landing-system : lando
2018-09-07 05:47:57 +00:00
Daniel Holbert f26874e5ee Bug 1489696: Adjust Scheduler::GetPrefs() return type to let it benefit from RVO and to address -Wreturn-std-move build warning. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5340

--HG--
extra : moz-landing-system : lando
2018-09-08 01:06:21 +00:00
Mike Hommey f9e00e249f Bug 1489728 - Unbreak MSVC builds after bug 1489363 r=froydnj
MSVC doesn't like AssignLiteral(condition ? "literal1" : "literal2")
even when both literals have the same length. (clang and gcc are both
happy with that)

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

--HG--
extra : moz-landing-system : lando
2018-09-08 11:38:57 +00:00
Henri Sivonen 39dc649092 Bug 1488697 - Make StringBuilder::ToString avoid repeated capacity and aliasing checks as well as terminator writes. r=smaug
* Avoid the string implementation's capacity checks, since we know they
   succeed.
 * Avoid the string implementation's aliasing checks, since we know there's no
   aliasing.
 * Avoid writing the zero terminator more than once or out of sequence.
 * Use u"" literals when appending literals to a UTF-16 string.
 * Write runs of non-escaped code units instead of writing code unit by code
   unit in order to benefit from SIMD (either via memcpy or
   ConvertLatin1toUTF16).

This results in a 13% execution time reduction on desktop Haswell i7 when
getting the innerHTML of the body of the Selectors spec. (The WebKit
optimization target from https://bugs.webkit.org/show_bug.cgi?id=81214 .)

MozReview-Commit-ID: LAg3gkGJnpQ

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

--HG--
extra : moz-landing-system : lando
2018-09-08 07:47:28 +00:00
Mike Hommey f1afe5ceec Bug 1489340 - Remove xpcom/typelib r=froydnj
Nothing is using the xpt module anymore, which means we can remove it,
as well as the runtests.py script that runs its test, and the
integration of those tests in the build system.

Depends on D5221

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

--HG--
extra : moz-landing-system : lando
2018-09-07 13:55:38 +00:00
Mike Hommey 32627430f6 Bug 1489363 - Replace some string.Append* with AppendLiteral. r=froydnj
Depends on D5224

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:04 +00: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
Sylvestre Ledru aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Emilio Cobos Álvarez c9c6290890 Bug 1489453 - EnumSet shouldn't take 32 bits if not needed. r=froydnj
This is the only reason I haven't used it before for things like
StyleSheet::State.

Change the underlying type to be the underlying enum representation by default,
but allow to override it if wanted.

Assertions should catch misuses.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:40:02 +00:00
Henri Sivonen ee4d95b01f Bug 1488452 - Remove incorrect use of PromiseFlatString in FileUtilsWin. r=froydnj
Also rewrote some code around the actual problem to be more obviously correct
and comprehensible.

MozReview-Commit-ID: FF2hSjQ4U1x

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:48:36 +00:00
Zibi Braniecki e78d123097 Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug
--HG--
extra : rebase_source : d071878d22b5fd204db8367780ee22be22196773
2018-09-06 18:28:40 -07: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
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
Nicholas Nethercote 9d2cf12ce4 Bug 1489010 - Remove XPIDL support for `Null` and `Undefined` value-taking properties on `DOMString` parameters and attributes. r=jorendorff
These properties were added in bug 478251 back when XPIDL was sort of emulating
WebIDL. They are not needed any more, and none of our XPIDL files use them.

--HG--
extra : rebase_source : f2f2c54ae787ad90704074eb114f00c3741d5f88
2018-09-06 13:42:05 +10: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
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
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
Bogdan Tara 8b38c1ae85 Merge autoland to mozilla-central. a=merge 2018-09-05 01:53:44 +03:00
ffxbld ebe4d2e4d6 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-09-04 11:15:27 -07:00
Henri Sivonen 34a614ae14 Bug 1488186 - Avoid writing past the logical length of a string in Base64URLEncode. r=froydnj
MozReview-Commit-ID: 4Sv7fHYIT9n

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

--HG--
extra : moz-landing-system : lando
2018-09-04 18:24:52 +00:00
Henri Sivonen f691976c87 Bug 1487051 - Remove EnsureStringLength(). r=froydnj
MozReview-Commit-ID: 4X4Rrs8xHTF

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

--HG--
extra : moz-landing-system : lando
2018-09-04 18:25:11 +00: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
Narcis Beleuzu 28a443cd37 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-02 01:00:31 +03:00
Brian Hackett cfe3b9a606 Bug 1486616 - Execute record/replay triggers when finalizing deferred things, r=mccr8.
--HG--
extra : rebase_source : 1b3091755ceaa78836e6fd40cb3af4ceedbebdbe
2018-08-31 05:35:36 -10:00
Brian Hackett 4d3ad5a928 Bug 1486573 - Track changes to nsPipeOutputStream writer count, r=froydnj.
--HG--
extra : rebase_source : f6a62ea3572e29424851c29c5b9526aab9d29bf5
2018-08-31 05:26:27 -10:00
Henri Sivonen 1a4db3c1d3 Bug 1487614 - Make the docs of SetCapacity() even more explicit. r=froydnj
MozReview-Commit-ID: KinrUtBG7Jd

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

--HG--
extra : moz-landing-system : lando
2018-09-01 07:50:11 +00:00
Henri Sivonen c62a32ebf1 Bug 1487606 - Make AppendLiteral() not undo the effect of SetCapacity(). r=froydnj
MozReview-Commit-ID: I2QSXbQhOUH

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

--HG--
extra : moz-landing-system : lando
2018-08-31 14:57:26 +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
Olli Pettay e8a92b84f1 Bug 1488413 - To improve performance, CycleCollector could use a cache on top of the graph's hashtable, r=mccr8
--HG--
extra : rebase_source : 8f67777644346549a3df3c4e97433378dc70a177
2018-09-04 23:22:37 +03:00
Henri Sivonen 818df08a5b Bug 1487050 - Remove CountCharInReadable() as dead code. r=froydnj
MozReview-Commit-ID: DpRxyOgO85X

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

--HG--
extra : moz-landing-system : lando
2018-09-04 14:48:39 +00:00
Narcis Beleuzu 05d91d3e02 Merge inbound to mozilla-central. a=merge 2018-08-30 19:58:52 +03:00
Henri Sivonen 5a26b995cf Bug 1487309 - Improve AssignLiteral() and AppendLiteral() documentation to talk about u"" literals. r=froydnj
MozReview-Commit-ID: 60NCtRgKRcn

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

--HG--
extra : moz-landing-system : lando
2018-08-30 14:37:09 +00:00
Henri Sivonen d733f8a4f2 Bug 1484987 - Avoid writing past the logical length of a string in XPCOM. r=froydnj
MozReview-Commit-ID: 3qkhOiQduLQ

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

--HG--
extra : moz-landing-system : lando
2018-08-30 11:09:27 +00:00
Paolo Amadini 5aaf848c8b Bug 1457218 - Part 3 - Remove the "menu-button" binding. r=surkov,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D4531

--HG--
extra : rebase_source : 502aa0ff24d0e3d46ef60c7a14498e25c66d1c81
2018-08-29 14:04:25 +01:00
Nathan Froyd 7624eea8a4 Bug 1480549 - add aarch64 windows support to xptcall; r=dmajor
Since the ABI on this platform just uses the ARM procedure call
standard, which is the same standard Unix uses, we can just
copy-and-paste everything, with some adjustments to the assembly code to
compile properly.
2018-08-29 15:49:57 -04:00
Margareta Eliza Balazs 2fe43133db Merge inbound to mozilla-central. a=merge 2018-08-29 12:43:37 +03:00
Andreea Pavel eb68a1e6db Backed out changeset 097c92352197 (bug 1484987) for failing gtests at Base64.TruncateOnInvalidDecodeCString on a CLOSED TREE 2018-08-29 10:15:50 +03:00
Henri Sivonen a459f8cbf4 Bug 1484987 - Avoid writing past the logical length of a string in XPCOM. r=froydnj
MozReview-Commit-ID: 3qkhOiQduLQ

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

--HG--
extra : moz-landing-system : lando
2018-08-29 06:04:57 +00:00
Andreea Pavel a7c7a16e37 Backed out changeset 9216e8942ed6 (bug 1484987) for build bustages at builds/worker/workspace/build/src/xpcom/io/nsStorageStream.cpp on a CLOSED TREE 2018-08-29 08:36:19 +03:00
Henri Sivonen 5969209bdc Bug 1484987 - Avoid writing past the logical length of a string in XPCOM. r=froydnj
MozReview-Commit-ID: 3qkhOiQduLQ

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:29:40 +00:00
Henri Sivonen e1f43883a7 Bug 1484668 - Document that writing past mLength code units via BeginWriting() is not OK. r=froydnj
MozReview-Commit-ID: FdZN8PGLO9M

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

--HG--
extra : moz-landing-system : lando
2018-08-24 12:50:06 +00:00
Gerald Squelart bad49db9b0 Bug 1479996 - Combine nsTArray::IndexOf and element access into lambda-friendly functions - r=froydnj
In many places, nsTArray::IndexOf is followed by accessing that element
(hopefully with `Elements() + index`, which skips unnecessary bounds checks.)
But this pattern introduces operations that could be avoided:
- IndexOf converts the address of the found element into an index,
- The caller must test for a special `NoIndex` value,
- On success, accesses convert that index back into the original address.

This patch introduces new 'ApplyIf...' functions that combine all these
operations in a more efficient ensemble: If the sought element is found, it is
passed by reference to a given callable object (usually a lambda); if not
found, another callable is invoked.
Depending on what they need, the first callable may take one of these parameter
lists: (), (size_t), (maybe-const elem_type&), (size_t, maybe-const elem_type&).
On top of removing the pointer->index->pointer operations in most cases,
invoking callables directly from ApplyIf is safer, as the array is guaranteed to
be untouched at this time.
Also, being templates taking function objects, in most cases the compiler should
be able to inline and optimize the search and its callables' code.

This patch gives example uses in nsTArray::Contains, and in
FrameProperties::GetInternal, SetInternal.
And FrameProperties::Has now calls Contains, which is more efficient because
the former code would compute an index (or NoIndex), and then convert that index
to a bool; whereas the new code directly produces a bool from within the search
algorithm.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 22:04:09 +00:00
Ciure Andrei d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Henri Sivonen c3d01b0fe9 Bug 1484045 - Prohibit shrinking of the string's buffer in appends of Latin1 to UTF-16 and vice versa. r=froydnj
This restores the old allocation semantics for "append" operations between
Latin1 and UTF-16 while keeping the buffer re-use optimization for the
"assign" cases.

MozReview-Commit-ID: 8JCw3AaCNLN

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:13:17 +00:00
Henri Sivonen 569510fbdc Bug 1485289 - Use BeginWriting() instead of GetMutableData() in LateWriteChecks. r=froydnj
MozReview-Commit-ID: G64L8b6wnO0

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:50:11 +00:00
Henri Sivonen acc4596637 Bug 1486470 - Avoid overwriting newData when there's an OOM failure on buffer shrinking attempt. r=froydnj
MozReview-Commit-ID: F54grcUOwBG

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:49:20 +00:00
Henri Sivonen 876f7ad09f Bug 1482828 - Introduce C++ analogs of Rust's nsA[C]StringBulkWriteHandle. r=froydnj
MozReview-Commit-ID: BZyHd4VzNur

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

--HG--
extra : moz-landing-system : lando
2018-08-28 16:42:26 +00:00
Henri Sivonen 8711bfbcb6 Bug 1483603 - Avoid propagating OOM from StartBulkWrite() when shrinking the buffer. r=froydnj
Shrinking the buffer is purely a memory footprint optimization and can be
omitted as far as the string semantics visible to the caller are concerned.
Since shrinking is optional, it doesn't make sense to propagate error when
it fails due to OOM.

MozReview-Commit-ID: BuyBLCBmYzZ

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

--HG--
extra : moz-landing-system : lando
2018-08-27 07:03:59 +00:00
David Keeler 1cd81e4c5a bug 1485087 - remove the option to use the TLS session cache from nsITLSServerSocket r=jryans,mayhemer
As initially implemented, nsITLSServerSocket by default enabled the use of the
TLS session cache provided by NSS. However, no consumers of nsITLSServerSocket
actually used it. Because it was an option, though, PSM had to jump through some
hoops to a) make it work in the first place and b) not have NSS panic on
shutdown. Furthermore, it meant increased memory usage for every user of Firefox
(and again, nothing actually used the feature, so this was for naught).

In bug 1479918, we discovered that if PSM shut down before Necko, NSS could
attempt to acquire a lock on the session cache that had been deleted, causing a
shutdown hang. We probably should make it less easy to make this mistake in NSS,
but in the meantime bug 1479918 needs uplifting and this workaround is the
safest, most straight-forward way to achieve this.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 16:00:34 +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 e51afbee7e Bug 1486690 - Remove unnecessary checks after moz_xrealloc() calls. r=glandium
--HG--
extra : rebase_source : c036680008cef1f87ed94700f9146022ce879e53
2018-08-28 15:56:23 +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
Nicholas Nethercote c5bd78e1f5 Bug 1486690 - Remove NS_ALIGNMENT_OF. r=glandium
It's unused, and MFBT has MOZ_ALIGNOF.

--HG--
extra : rebase_source : 9cd4b75f8077fd727c689cdbcb34baa265795fd2
2018-08-28 15:55:20 +10:00
Ciure Andrei 9aabc73223 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-29 01:31:20 +03:00
Kris Maglione 7c4ecc33ad Bug 1486182: Follow-up: Fix straggler nsIUTF8StringEnumerator references. r=bustage CLOSED TREE
--HG--
extra : amend_source : 78712fd8de524cb047e6e398c47333bacfcd85db
2018-08-28 14:29:16 -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 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 367cf770e4 Bug 1484373: Follow-up: Fix missed review comment. r=froydnj (implied)
--HG--
extra : rebase_source : 4a107432497e269e0c8e73924d33ca5477b057af
2018-08-24 22:31:10 -07:00
aceman 77d5a7fd81 Bug 1486311 - convert remaining nsIFile::GetDirectoryEntries() callers to pass in a nsIDirectoryEnumerator. r=kmag 2018-08-26 14:15:00 +03: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 c943b2a5c4 Bug 1484496: Part 4a - Add JS iterator support to nsISimpleEnumerator. r=mccr8
This patch adds simple stubs to convert between the nsISimpleEnumerator
iteration protocol and the JS iteration protocol.

Each iterable object is required to have an @@iterator method which returns an
object implementing the iterator protocol. The later objects, by convention,
also have such a method which returns the object itself.

This patch adds both a @@iterator() and entries() methods to
nsISimpleEnumerator. The former returns an iterator which returns plain
nsISupports objects. The latter accepts an IID and queries each element to
that IID before returning it. If any element fails to query, the error is
propagated to the caller.

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

--HG--
extra : rebase_source : 340eb43a1c5e6d7ae69fa8ee486d66d31d079b14
extra : histedit_source : f3efc6c265851a563968ee410e4626e0540f55c0
2018-08-18 16:02:49 -07:00
Kris Maglione 0425e42aa8 Bug 1484496: Part 3 - Fix nsISimpleEnumerator implementations with broken contracts. r=froydnj
The nsISimpleEnumerator contract specifies that GetNext() returns
NS_ERROR_FAILURE when iteration is complete. Several implementations, however,
either return NS_OK and a null result, or return some other error code, when
iteration is complete.

Since my initial implementation of the JS iteration stubs rely on the
contract-defined behavior of GetNext(), these need to be fixed before it can
land.

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

--HG--
extra : rebase_source : aab0395df52e18ccff5b0a2489a983013bf484b1
extra : histedit_source : a5644f0a88799b4463af9dd01dfec33b373b1f58
2018-08-18 18:28:10 -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 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
Kris Maglione 376fa824ca Bug 1484373: Part 3 - Add ranged iterator wrapper for nsISimpleEnumerator. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D3693

--HG--
extra : rebase_source : cbbdff7253ca244614cc151342e3d4fb9ebfdbb1
extra : histedit_source : f613ae6c6114e55c13231d56911657989d697c03
2018-08-17 19:36:18 -07:00
Kris Maglione bb6ad284b5 Bug 1484373: Part 2b - Add cycle collection helpers for Tuple types. r=smaug
--HG--
extra : rebase_source : 268282522c8c217137974113416d26313b1c0249
2018-08-19 17:43:29 -07:00
Landry Breuil 3870cf7d0c Bug 1457092 - Disable codepaths forbidden by pledge() when being sandboxed on OpenBSD. r=froydnj
--HG--
extra : rebase_source : 49ef652c8c36ded2f18ed635b361250214eec55b
2018-08-22 05:29:00 -04:00
Marco Castelluccio aac81fa3f1 Bug 1486528 - Remove some unnecessary nsIMemory imports. r=njn
--HG--
extra : rebase_source : 5abdbcd1efa23cb05cb1f1dc995c3d532d240de9
2018-08-27 16:38:18 +02: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
James Willcox 89e3bb5c75 Bug 1480095 - Allow loading custom error pages via nsILoadURIDelegate r=esawin,bz,jchen
MozReview-Commit-ID: IhVC9nU60fy
2018-08-22 08:46:41 -05:00
Nathan Froyd 3e20f0d916 Bug 1471743 - remove STRICT_FAKE_SYMLINKS code from nsLocalFileWin; r=erahm
We don't define STRICT_FAKE_SYMLINKS anywhere, so this is dead code.
2018-08-21 17:00:59 -04:00
Brian Hackett b2e98506b6 Bug 1483365 - Run SnowWhiteKiller non-incrementally when recording/replaying, r=mccr8.
--HG--
extra : rebase_source : e3b1824a4ecfcc7a5c2cbd77b63d36ceca624741
2018-08-21 01:01:40 +00:00
Mike Conley fe62d22333 Bug 1355346 - Call nsCocoaFileUtils::AddOriginMetadataToFile off of the main-thread when completing downloads. r=mstange
Tags: #secure-revision

Bug #: 1355346

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

--HG--
extra : rebase_source : 2d128a363f21b82364562ac19c53d715eeac0d9d
2018-08-17 19:07:51 -04:00
Dave Townsend 204fe23163 Bug 1484844: Make nsINIParser mutable. r=froydnj
In order to implement profile-per-install we need a mutable INI parser in early
startup. The current one is implemented in JavaScript and thus not available.
This makes the current read-only C++ INI parser mutable and removes the
JavaScript implementation.

It turns out that the two different implementations of nsIINIParserFactory and
nsIINIParser behaved slightly differently but only in ways that the single test
cared about so I've adjusted things a little to make it work.

The existing C++ implementation did not do validity checks on arguments, this
adds that making empty sections and values illegal.

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

--HG--
rename : xpcom/tests/unit/test_iniProcessor.js => xpcom/tests/unit/test_iniParser.js
extra : source : 524941c8ed0e048ee51be1bd11082b41428ef490
extra : amend_source : 2de6cef5be97448a41733bedda29d6af34aed27a
2017-10-12 14:20:57 -07:00
Dorel Luca 07c6e76122 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-21 12:54:24 +03:00
Gabriele Svelto afec91a1db Bug 1459212 - Save memory reports for use in crash reports when low on memory r=dmajor,mccr8
This moves the code that detects very low memory scenarios and grabs memory
reports from the main thread event-loop to the available memory tracker.
Besides removing the overhead of the check from the event-loop code this
increases the likeliness of the reports being gathered by sampling at a
higher frequency but only when we already detected a low-memory scenario. Last
but not least this add checks for low commit-space detection alongside low
virtual-memory detection.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 21:53:27 +00:00
Daosheng Mu 8ac5934ce1 Bug 1430038 - Part 1: Add VR process to the process list; r=kip, jimm
Summary: MozReview-Commit-ID: AWyFur2gLCQ

Tags: #secure-revision

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

MozReview-Commit-ID: HHGDiXyaqnB

--HG--
extra : rebase_source : cbb94eb1aaca4ca385559c0e997b508a80121105
2018-06-22 16:30:14 -07:00
Margareta Eliza Balazs 0b2fdd0c87 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-17 12:50:13 +03:00
Emilio Cobos Álvarez accc448c34 Bug 1483823 - Deduplicate system metric atoms. r=xidorn
Now that :-moz-system-metric is gone, there's no real reason for the atoms to
be separate.

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

--HG--
extra : moz-landing-system : lando
2018-08-17 01:07:22 +00:00
Tiberius Oros 482b5ce92a Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-17 00:38:55 +03:00
Ehsan Akhgari b2673019da Bug 1483650 follow-up: Remove two extra declarations which aren't needed any more 2018-08-16 16:57:23 -04:00
Ehsan Akhgari e4ec6f1178 Bug 1483650 - Remove the component registration for nsCycleCollectorLogger; r=mccr8 2018-08-16 16:52:31 -04:00
Cameron McCormack 0e70842906 Bug 1483449 - Simplify nsStaticAtomUtils::Lookup. r=njn 2018-08-16 11:40:02 +10:00
Csoregi Natalia 22b0dc3451 Backed out changeset a91ccbe2b3fd (bug 1483449) for failures at nsStaticAtomUtils.h:25. CLOSED TREE 2018-08-16 05:11:46 +03:00
Cameron McCormack a4d0161e79 Bug 1483449 - Simplify nsStaticAtomUtils::Lookup. r=njn 2018-08-16 11:40:02 +10:00
Diego Pino Garcia 05039e8e29 Bug 1357636 - Improve IndexedDB error message on deleting an undefined object; r=janv
Patch authored by Diego Pino Garcia.
2018-08-15 15:35:58 +02:00
Cameron McCormack be0a66bcfb Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack 426af33a36 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack b17e6b4468 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack 99d9013b12 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack 4a23b5ff06 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack 8ae48d7906 Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
Cameron McCormack 1cbfafaeb7 Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Cameron McCormack b7b0540cce Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
Reviewers: njn!, hsivonen!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3280
2018-08-15 15:46:00 +10:00
Narcis Beleuzu d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack 0b89d2391b Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack ec18757d45 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack e816227f97 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack cc6c806369 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack caeb752d2f Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
Cameron McCormack ae87156cab Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Cameron McCormack ee27868fc6 Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
Reviewers: njn!, hsivonen!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3280
2018-08-15 15:46:00 +10:00
Henri Sivonen 8e541f1e0a Bug 1473337 - Omit ASCII-case length calculation for short strings when performing an encoding conversion that expands non-ASCII. r=Nika
MozReview-Commit-ID: 88k27XnFym9

--HG--
extra : rebase_source : d633eee2a8f64df22663607125ca99a42c59ec6d
2018-07-05 09:27:29 +03:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Nicholas Nethercote 10d6977432 Bug 1477627 - Convert CCGraph::mPtrToNodeMap to a mozilla::HashSet. r=mccr8
Because mozilla::HashSet is much faster than PLDHashTable, and mPtrToNodeMap is
hot.

--HG--
extra : rebase_source : bd861a1cd07ae27f4d18ce5c01ca40c5bb73c035
2018-08-14 09:25:51 +10:00
Nicholas Nethercote ce73ba39cf Bug 1482011 - Make Bench_Cpp_MozHashSet more idiomatic. r=froydnj
I discovered there are some shortcut methods for some common operations.

--HG--
extra : rebase_source : b22ca592af24857e093308d4b6351621062b8cea
2018-08-14 08:52:38 +10:00
Nicholas Nethercote b9e071e2e8 Bug 1481998 - Make mozilla::Hash{Map,Set}'s entry storage allocation lazy. r=luke,sfink
Entry storage allocation now occurs on the first lookupForAdd()/put()/putNew().
This removes the need for init() and initialized(), and matches how
PLDHashTable/nsTHashtable work. It also removes the need for init() functions
in a lot of types that are built on top of mozilla::Hash{Map,Set}.

Pros:

- No need for init() calls and subsequent checks.

- No memory allocated for empty tables, which are not that uncommon.

Cons:

- An extra branch in lookup() and lookupForAdd(), but not in put()/putNew(),
  because the existing checkOverloaded() can handle it.

Specifics:

- Construction now can take a length parameter.

- init() is removed. Explicit length-setting, when necessary, now occurs in the
  constructors.

- initialized() is removed.

- capacity() now returns zero when the entry storage is absent.

- lookupForAdd() is no longer `const`, because it can instantiate the storage,
  which requires modifications.

- lookupForAdd() can now return an invalid AddPtr in two cases:

  - old: hashing failure (due to OOM in the hasher)

  - new: OOM while instantiating entry storage

  The existing failure handling paths for the old case work for the new case.

- clear(), finish(), and clearAndShrink() are replaced by clear(), compact(),
  and reserve(). The old compactIfUnderloaded() is also removed.

- Capacity computation code is now in its own functions, bestCapacity() and
  hashShift(). setTableSizeLog2() is removed.

- uint32_t is used throughout for capacities, instead of size_t, for
  consistency with other similar values.

- changeTableSize() now takes a capacity instead of a deltaLog2, and it can now
  handle !mTable.

Measurements:

- Total source code size is reduced by over 900 lines. Also, lots of existing
  lines got shorter (i.e. two checks were reduced to one).

- Executable size barely changed, down by 2 KiB on Linux64. The extra branches
  are compensated for by the lack of init() calls.

- Speed changed negligibly. The instruction count for Bench_Cpp_MozHash
  increased from 2.84 billion to 2.89 billion but any execution time change was
  well below noise.
2018-08-10 18:00:29 +10:00
Chris Peterson 02588f7a04 Bug 1481097 - xpcom: Remove nsTString literal string workaround for gcc 4.9 bug. r=nika
This gcc 4.9 workaround (from bug 1377351) is no longer needed because Firefox currently requires gcc 6.1 or later (as of bug 1444274).

MozReview-Commit-ID: 9R14BDzWEoj

--HG--
extra : rebase_source : a56ec3ee321cdc76e704fe33c2c4a5b85b558889
extra : source : e0c26ec11d499058e51bc2c3d06b2e1840e77f13
2018-07-22 00:02:34 -07:00
Henri Sivonen 3a52652295 Bug 1349528 - Use encoding_rs for normalizing USVString. r=smaug
MozReview-Commit-ID: 9uG6j8UdfKR

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

--HG--
extra : moz-landing-system : lando
2018-08-16 10:15:07 +00: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 Varga d38e92d73f Bug 1399789 - nsSubstringSplitter/nsCSubstringSplitter is not defined anymore; r=erahm 2018-08-09 14:18:22 +02:00
Daniel Varga 31ff8cd9c8 Merge mozilla-central to mozilla inbound. a=merge 2018-08-09 01:10:56 +03:00
Csoregi Natalia 0ed25650ef Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-08 13:02:49 +03:00
Alex Gaynor 8f9e8a51b2 Bug 1446509 - added final versions of macro for declaring AddRef and Decref; r=froydnj
Also make use of them in a few places.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 18:25:49 +00: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
Andrew Osmond 51d273388c Bug 1416328 - Part 2. Expose decoding attribute for img elements. r=bz,tnikkel
This adds support for HTMLImageElement's decoding attribute, as
described by:

https://github.com/whatwg/html/pull/3221
https://whatpr.org/html/3221/images.html#decoding-images

It also exposes the same attribute on SVGImageElement, just as Blink has
chosen to do so.
2018-08-08 07:56:01 -04:00
agashlin@mozilla.com a03dfcbd42 bug 1397297, make SnowWhite freeing more incremental, r=smaug
--HG--
extra : rebase_source : 0772adabddb6cee33d83184d32c981d3920ea6e6
2018-08-08 09:14:58 +03:00
Dylan Roeh 63ca464a8c Bug 1441059 - Make nsILoadURIDelegate async to preserve the order of GeckoSession.loadUri() calls. r=snorp,bz
This alters nsILoadURIDelegate.loadURI() to return a Promise rather than spinning the event loop to synchronously return a boolean, and alters nsDocShell::InternalLoad to allow for those changes by re-calling itself if necessary based on the resolution of the promise.
2018-08-07 13:42:07 -05:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Noemi Erli 23c8a3a9f3 Backed out changeset 1e9ecba54e7b (bug 1348273) for failing on widget/tests/test_bug1123480.xul 2018-08-04 12:39:40 +03:00
Dorel Luca 33b000ddd1 Merge mozilla-central to mozilla-inbound 2018-08-04 01:31:40 +03:00
Dorel Luca 5c509fd70a Backed out changeset 8c763e66ba84 (bug 1397297) for frequent mochitest failures. a=backout 2018-08-04 01:27:15 +03:00
Boris Zbarsky f771d7e529 Bug 1477923. Make WebIDL callbacks store a global in addition to the object that's used as a callback. r=mccr8
We want to be able to enter the Realm we were in when the callback was created
before calling it, but if the callback stores a cross-compartment wrapper we
don't really have a good way to find that Realm.  So we store it explicitly by
storing a global when the callback is created.

The changes to the constructor signatures to use JSObject* instead of
JS::Handle<JSObject*> are so we can avoid having to root the global for these
calls.  These changes make two of the constructors ambiguous when nullptr is
being passed for the first arg; this patch adds casts to disambiguate.
2018-08-03 17:11:39 -04:00
Gabriele Svelto 50ba13cce4 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 functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code 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 (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : b4f0d4bf83c64851028c271d3fab3ebcb6fbcd3e
2018-07-05 15:42:11 +02:00
Nika Layzell f1902ff595 Bug 1480624 - Part 1: Add XPT_FOR_EACH_*_TYPE macros to xptinfo.h, r=mccr8
Summary:
This macro simplifies code which allows performing an operation on or
extracting information from a particular nsXPTType's native representation.

It is also used in part 2 to implement xpc::DestructValue.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1480624

Differential Revision: https://phabricator.services.mozilla.com/D2689
2018-08-03 15:55:13 -04:00
Coroiu Cristina 1ba19a32ac Backed out changeset 86471a18672f (bug 1348273) for ESlint failure at toolkit/modules/WebNavigationChild.jsm
--HG--
extra : rebase_source : e0c94f49ddc1f1b119b72c06fccc1b4363b9d340
2018-08-03 22:48:51 +03:00
Gabriele Svelto eff24befbd 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 functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code 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 (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : f0e8d229581ac5c0daa0e0454cb258746108e28d
2018-07-05 15:42:11 +02:00
Bogdan Tara 4759ec60f7 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-03 13:28:32 +03:00
Nicholas Nethercote 097b276f5c Bug 1480660 - Remove ConstExprHash{UntilZero,String}(). r=froydnj
They were workarounds for bugs in GCC 4.9, which is no longer supported.

--HG--
extra : rebase_source : b793b4643e1e44199afdb8e8b35f930e02664be8
2018-08-03 14:47:41 +10:00
Tom Ritter c9e4e2854a Bug 1480177 Lowercase includes to fix MinGW Build Errors r=froydnj
MozReview-Commit-ID: LvFS90CRAFe

--HG--
extra : rebase_source : bfbcc59d061128e5440378448523bbaf939d5a45
2018-07-30 22:43:24 -05:00
Brian Hackett 51e310f29a Bug 1479547 Part 1 - Remove instrumentation related to non-deterministic GCs, r=mccr8.
--HG--
extra : rebase_source : 6dfc65ab83e770da6e1f64003379156c3b863050
2018-07-31 19:34:50 +00:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Brian Hackett 3c13dd9f31 Bug 1479641 - Don't record counting allocator amount, r=froydnj.
--HG--
extra : rebase_source : 23de9644662c1f9ed36429074837e54bb7cac868
2018-07-31 19:22:54 +00:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Noemi Erli 58e27f3dd9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-02 12:04:24 +03:00
Noemi Erli 8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00